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.
This commit is contained in:
parent
40e9b7ba3a
commit
edcfcae78c
20
build/upload
20
build/upload
|
|
@ -30,9 +30,23 @@ main() {
|
||||||
|
|
||||||
echo "Creating symlinks for $target.."
|
echo "Creating symlinks for $target.."
|
||||||
|
|
||||||
ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive" "$symlink"
|
if ssh -n -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive" "$symlink"; then
|
||||||
ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive.sig" "$symlink.sig"
|
echo "✓ Created symlink: $symlink"
|
||||||
ssh -i "$SSH_KEY" "$SSH_ADDRESS" ln -snf "$archive.sha256" "$symlink.sha256"
|
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
|
done < build/TARGETS
|
||||||
|
|
||||||
# TODO(cloudhead): Don't pass `--tags` when we have canonical refs.
|
# TODO(cloudhead): Don't pass `--tags` when we have canonical refs.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue