1
0
Fork 0
mirror of https://github.com/NeoCloud/NeoNetwork synced 2024-11-26 10:00:41 +08:00
NeoNetwork/.scripts/push-to-roa.sh

24 lines
501 B
Bash
Raw Normal View History

2020-07-21 00:19:10 +08:00
#!/usr/bin/env bash
2020-07-21 00:40:22 +08:00
set -euo pipefail
2020-07-21 00:19:10 +08:00
IFS=$'\n\t'
2020-07-21 02:06:15 +08:00
if [ -z "$SSHPRIVKEY" ]; then
2020-07-21 00:19:10 +08:00
echo SSHPRIVKEY is not set
exit 1
fi
2020-07-21 00:40:22 +08:00
2020-07-21 00:19:10 +08:00
mkdir -p "$HOME/.ssh"
echo "$SSHPRIVKEY" | base64 -d >"$HOME/.ssh/id_ed25519"
chmod 0600 "$HOME/.ssh/id_ed25519"
2020-07-21 00:40:22 +08:00
set -x
2020-07-21 02:06:15 +08:00
cd generated || exit 1
2020-07-21 02:03:50 +08:00
2020-07-21 01:50:05 +08:00
git remote set-url origin git@github.com:NeoCloud/NeoNetwork-ROA.git
2020-07-21 02:03:50 +08:00
git config user.name "NeoCloud ROA bot"
git config user.email "support@neocloud.tw"
2020-07-21 00:40:22 +08:00
git add .
2020-07-21 02:03:50 +08:00
git commit -m "Generated at $(date -u +"%Y-%m-%dT%H:%M:%SZ")"
2020-07-21 01:26:30 +08:00
git push