bat/ci/before_deploy.bash
2# Building and packaging for release
7 cargo build --target "$TARGET" --release --verbose
16 tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
18 package_name="$PROJECT_NAME-$TRAVIS_TAG-$TARGET"
20 if [[ $TARGET == "arm-unknown-linux-gnueabihf" ]]; then
21 gcc_prefix="arm-linux-gnueabihf-"
26 # create a "staging" directory
27 mkdir "$tempdir/$package_name"
29 # copying the main binary
30 cp "target/$TARGET/release/$PROJECT_NAME" "$tempdir/$package_name/"
31 "${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"
34 cp README.md "$tempdir/$package_name"
35 cp LICENSE-MIT "$tempdir/$package_name"
36 cp LICENSE-APACHE "$tempdir/$package_name"
40 tar czf "$out_dir/$package_name.tar.gz" "$package_name"/*
60 echo "make_deb: skipping target '${TARGET}'" >&2
64 version=${TRAVIS_TAG#v}
65 if [[ $TARGET = *musl* ]]; then
66 dpkgname=$PROJECT_NAME-musl
67 conflictname=$PROJECT_NAME
69 dpkgname=$PROJECT_NAME
70 conflictname=$PROJECT_NAME-musl
73 tempdir=$(mktemp -d 2>/dev/null || mktemp -d -t tmp)
75 # copy the main binary
76 install -Dm755 "target/$TARGET/release/$PROJECT_NAME" "$tempdir/usr/bin/$PROJECT_NAME"
77 strip "$tempdir/usr/bin/$PROJECT_NAME"
80 install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
81 install -Dm644 LICENSE-MIT "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-MIT"
82 install -Dm644 LICENSE-APACHE "$tempdir/usr/share/doc/$PROJECT_NAME/LICENSE-APACHE"
85 mkdir "$tempdir/DEBIAN"
86 cat > "$tempdir/DEBIAN/control" <<EOF
91Maintainer: David Peter <mail@david-peter.de>
92Architecture: $architecture
93Provides: $PROJECT_NAME
94Conflicts: $conflictname
95Description: A cat(1) clone with wings.
98 fakeroot dpkg-deb --build "$tempdir" "${dpkgname}_${version}_${architecture}.deb"
105 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