ci: Move shell scripts into standalone files

This commit is contained in:
Adam Szkoda
2023-06-20 13:16:57 +02:00
committed by Alexis Sellier
parent 9418a20cae
commit 8c701dc908
5 changed files with 113 additions and 82 deletions
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
main () {
if [[ $# -ne 1 ]]; then
echo "$#: Wrong number of arguments"
return 1
fi
local target=$1
rustup target add "$target"
local staging="radicle-$target"
mkdir -p "$staging"
cargo build --target="$target" --package=radicle-httpd --release
cp target/"$target"/release/radicle-httpd "$staging"/
cargo build --target="$target" --package=radicle-node --release
cp target/"$target"/release/radicle-node "$staging"/
cargo build --target="$target" --bin rad --release
cp target/"$target"/release/rad "$staging"/
cargo build --target="$target" --bin git-remote-rad --release
cp target/"$target"/release/git-remote-rad "$staging"/
tar czf "$staging.tar.gz" "$staging"
cp "$staging.tar.gz" "$staging"/
}
main "$@"