41 lines
1.4 KiB
Bash
Executable File
41 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
|
|
cargo build --locked --release
|
|
|
|
# create the tar package
|
|
mkdir -p build/bin build/share/doc/tiempo build/share/man/man1 build/share/bash-completion/completions build/share/zsh/site-functions build/share/fish/vendor_completions.d
|
|
# move binary
|
|
cp target/release/t build/bin/
|
|
# move documentation
|
|
cp CHANGELOG.md build/share/doc/tiempo/
|
|
cp README.md build/share/doc/tiempo/
|
|
cp LICENSE build/share/doc/tiempo/
|
|
# move man page
|
|
cp docs/build/man/tiempo.1.gz build/share/man/man1/
|
|
# move completions
|
|
cp completions/bash/t build/share/bash-completion/completions/
|
|
cp completions/fish/t.fish build/share/fish/vendor_completions.d/
|
|
cp completions/zsh/_t build/share/zsh/site-functions/
|
|
# compress the tar file
|
|
tar -cvzf tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz build/
|
|
# makes the debian archive
|
|
./scripts/debpackage.sh
|
|
# computes the sums
|
|
sha256sum tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz > tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz.sum
|
|
sha256sum debian-package/tiempo_${CI_COMMIT_TAG:1}_amd64.deb > tiempo_${CI_COMMIT_TAG:1}_amd64.deb.sum
|
|
mkdir -p artifacts
|
|
mv tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz artifacts/
|
|
mv debian-package/tiempo_${CI_COMMIT_TAG:1}_amd64.deb artifacts/
|
|
mv tiempo-${CI_COMMIT_TAG:1}-x86_64.tar.gz.sum artifacts/
|
|
mv tiempo_${CI_COMMIT_TAG:1}_amd64.deb.sum artifacts/
|