forked from platypush/platypush
Fabio Manganiello
7fa0dbda7b
A fully self-contained 1.5k LoC Drone file isn't very maintainable, and it makes it hard to reuse parts that are shared across multiple steps (like SSH and git configuration).
13 lines
393 B
Bash
Executable file
13 lines
393 B
Bash
Executable file
#!/bin/sh
|
|
|
|
. .drone/macros/configure-git.sh
|
|
. .drone/macros/configure-ssh.sh
|
|
|
|
ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null
|
|
|
|
# Clone the repository
|
|
git remote add github git@github.com:/BlackLight/platypush.git
|
|
git pull --rebase github "$(git branch | head -1 | awk '{print $2}')" || echo "No such branch on Github"
|
|
|
|
# Push the changes to the GitHub mirror
|
|
git push --all -v github
|