43 lines
1.4 KiB
Bash
Executable File
43 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Fail if any of the commands fail
|
|
set -e
|
|
|
|
# Build the docs
|
|
cd docs/
|
|
make man
|
|
gzip -f build/man/tiempo.1
|
|
cd ..
|
|
|
|
# build the binary
|
|
rustup component add clippy
|
|
cargo clippy --all-targets --all-features -- -D warnings
|
|
cargo test
|
|
cargo build --locked --release
|
|
|
|
# move binary
|
|
install -m 755 -D target/release/t build/bin/t
|
|
# move documentation
|
|
install -m 644 -D CHANGELOG.md build/share/doc/tiempo/CHANGELOG.md
|
|
install -m 644 -D README.md build/share/doc/tiempo/README.md
|
|
install -m 644 -D LICENSE build/share/doc/tiempo/LICENSE
|
|
# move man page
|
|
install -m 644 -D docs/build/man/tiempo.1.gz build/share/man/man1/tiempo.1.gz
|
|
# move completions
|
|
install -m 644 -D completions/bash/t build/share/bash-completion/completions/t
|
|
install -m 644 -D completions/fish/t.fish build/share/fish/vendor_completions.d/t.fish
|
|
install -m 644 -D completions/zsh/_t build/share/zsh/site-functions/_t
|
|
|
|
# compress the tar file
|
|
tar -cvzf tiempo-${CI_COMMIT_TAG}-x86_64.tar.gz build/
|
|
# makes the debian archive
|
|
./scripts/debpackage.sh
|
|
# computes the sums
|
|
sha256sum tiempo-${CI_COMMIT_TAG}-x86_64.tar.gz > tiempo-${CI_COMMIT_TAG}-x86_64.tar.gz.sum
|
|
sha256sum debian-package/tiempo_${CI_COMMIT_TAG}_amd64.deb > tiempo_${CI_COMMIT_TAG}_amd64.deb.sum
|
|
mkdir -p artifacts
|
|
mv tiempo-${CI_COMMIT_TAG}-x86_64.tar.gz artifacts/
|
|
mv debian-package/tiempo_${CI_COMMIT_TAG}_amd64.deb artifacts/
|
|
mv tiempo-${CI_COMMIT_TAG}-x86_64.tar.gz.sum artifacts/
|
|
mv tiempo_${CI_COMMIT_TAG}_amd64.deb.sum artifacts/
|