bat/ci/before_deploy.bash
2# Building and packaging for release
7 cargo build --target "$TARGET" --release --verbose
15 tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
17 package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
19 # create a "staging" directory
20 mkdir "$tempdir/$package_name"
22 # copying the main binary
23 cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
24 strip "$tempdir/$package_name/$PROJECT_NAME"
27 cp README.md "$tempdir/$package_name"
28 cp LICENSE-MIT "$tempdir/$package_name"
29 cp LICENSE-APACHE "$tempdir/$package_name"
33 tar czf "$out_dir/$package_name.tar.gz" "$package_name"/*
53 echo "ERROR: unknown target" >&2
57 version=${TRAVIS_TAG#v}
58 if [[ $TARGET = *musl* ]]; then
59 dpkgname=$PROJECT_NAME-musl
60 conflictname=$PROJECT_NAME
62 dpkgname=$PROJECT_NAME
63 conflictname=$PROJECT_NAME-musl
66 tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
68 # copy the main binary
69 install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME"
70 strip "$tempdir/usr/bin/$PROJECT_NAME"
73 install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
74 install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT"
75 install -Dm644 LICENSE-APACHE "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-APACHE"
78 mkdir "$tempdir/DEBIAN"
79 cat > "$tempdir/DEBIAN/control" <<EOF
84Maintainer: David Peter <mail@david-peter.de>
85Architecture: $architecture
86Provides: $PROJECT_NAME
87Conflicts: $conflictname
88Description: A cat(1) clone with wings.
91 fakeroot dpkg-deb --build "$tempdir" "${dpkgname}_${version}_${architecture}.deb"
98 if [[ $TARGET = *linux* ]]; then
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list