forked from linebender/resvg
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake-vendored.sh
executable file
·41 lines (32 loc) · 1 KB
/
make-vendored.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -e
VERSION="0.9.1"
git clone https://github.com/RazrFalcon/resvg resvg-$VERSION
cd resvg-"$VERSION"
git checkout tags/v"$VERSION" -b temp-branch
mkdir -p .cargo
cargo-vendor vendor --relative-path > .cargo/config
cd ..
env XZ_OPT="-9e" tar \
--exclude=".git" \
--exclude=".gitignore" \
--exclude=".travis.yml" \
--exclude="resvg-$VERSION/.github" \
--exclude="resvg-$VERSION/version-bump.md" \
--exclude="resvg-$VERSION/docs" \
--exclude="resvg-$VERSION/benches" \
--exclude="resvg-$VERSION/examples" \
--exclude="resvg-$VERSION/svg-tests" \
--exclude="resvg-$VERSION/testing-tools" \
--exclude="resvg-$VERSION/capi/qtests" \
-cJf resvg-"$VERSION".tar.xz resvg-"$VERSION"
# Clean up.
rm -rf resvg-"$VERSION"
# Test our archive.
tar -xJf resvg-"$VERSION".tar.xz
cd resvg-"$VERSION"
cargo build --verbose --release --frozen \
--manifest-path tools/rendersvg/Cargo.toml --features "raqote-backend"
# Clean up again.
cd ..
rm -r resvg-"$VERSION"