add deploy.sh (tar + scp to devone)
This commit is contained in:
17
deploy.sh
Executable file
17
deploy.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ARCHIVE="/tmp/scm-slicing-$(date +%Y%m%d-%H%M%S).tar.gz"
|
||||
DEST="devone:~/project/one/supply-chain-management"
|
||||
|
||||
echo "Creating archive..."
|
||||
tar -czf "$ARCHIVE" --exclude='.git' --exclude='.gitignore' .
|
||||
|
||||
echo "Uploading to $DEST..."
|
||||
scp "$ARCHIVE" "$DEST"
|
||||
|
||||
echo "Extracting on remote..."
|
||||
ssh devone "cd ~/project/one/supply-chain-management && tar -xzf $(basename "$ARCHIVE") && rm $(basename "$ARCHIVE")"
|
||||
|
||||
rm "$ARCHIVE"
|
||||
echo "Deploy complete."
|
||||
Reference in New Issue
Block a user