Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
ci: Add version file to binary release
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhead committed Mar 13, 2024
1 parent 3ad2b44 commit 5e8d233
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/update-latest-symlink.bash
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
#!/bin/bash
#!/bin/sh

set -o errexit
set -o nounset
set -o pipefail

exec-remote() {
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key [email protected] "$@"
}

main () {
if [[ $# -ne 1 ]]; then
echo "$#: Wrong number of arguments"
return 1
fi
if [ $# -ne 1 ]; then
echo "$#: Wrong number of arguments"
return 1
fi
target="x86_64-unknown-linux-musl"
sha=$1

trap 'rm -f ssh-private-key' EXIT

echo "$SSH_PRIVATE_KEY" > ssh-private-key
chmod go-rwx ssh-private-key

local sha=$1
echo "$SSH_PRIVATE_KEY" >ssh-private-key
chmod go-rwx ssh-private-key
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ssh-private-key [email protected] ln -snf "/mnt/radicle/releases/${sha}" "/mnt/radicle/releases/latest"
exec-remote "/mnt/radicle/releases/${sha}/${target}/rad version --json > /mnt/radicle/releases/${sha}/version.json"
# exec-remote ln -snf "/mnt/radicle/releases/${sha}" "/mnt/radicle/releases/latest"
}

main "$@"

0 comments on commit 5e8d233

Please sign in to comment.