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
+29
View File
@@ -0,0 +1,29 @@
#!/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"
staging="radicle-$target"
mkdir -p "$staging/debug"
cargo build --target "$target" --bin git-remote-rad
cp target/"$target"/debug/git-remote-rad "$staging"/debug/
cargo build --target="$target" --bin rad
cp target/"$target"/debug/rad "$staging"/debug/
tar czf "$staging-debug.tar.gz" "$staging"/debug
cp "$staging-debug.tar.gz" "$staging"/debug/
}
main "$@"