From edcfcae78cc58e6b85a922acde46ff4eb3f5b6f4 Mon Sep 17 00:00:00 2001 From: Fintan Halpenny Date: Mon, 26 May 2025 14:01:20 +0200 Subject: [PATCH] build: fix ssh symlinking The symlinking process of `build/upload` was not working, due to the command consuming stdin, and ignoring the subsequent targets platforms. Use `-n` to prevent this, allowing every target binary to be uploaded correctly. The output is also improved for better feedback during the upload process. --- build/upload | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/build/upload b/build/upload index e0b9439c..9c92d6b5 100755 --- a/build/upload +++ b/build/upload @@ -30,9 +30,23 @@ main() { echo "Creating symlinks for $target.." - ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive" "$symlink" - ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive.sig" "$symlink.sig" - ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive.sha256" "$symlink.sha256" + if ssh -n -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive" "$symlink"; then + echo "✓ Created symlink: $symlink" + else + echo "✗ Failed to create symlink: $symlink" + fi + + if ssh -n -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive.sig" "$symlink.sig"; then + echo "✓ Created symlink: $symlink.sig" + else + echo "✗ Failed to create symlink: $symlink.sig" + fi + + if ssh -n -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive.sha256" "$symlink.sha256"; then + echo "✓ Created symlink: $symlink.sha256" + else + echo "✗ Failed to create symlink: $symlink.sha256" + fi done < build/TARGETS # TODO(cloudhead): Don't pass `--tags` when we have canonical refs.