2024-05-23 00:17:55 +02:00
|
|
|
#!/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
|
2024-09-02 02:31:11 +02:00
|
|
|
branch=$(git rev-parse --abbrev-ref HEAD)
|
|
|
|
if [ -z "${branch}" ]; then
|
|
|
|
echo "No branch checked out"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-07-27 15:38:41 +02:00
|
|
|
git remote add github git@github.com:/blacklight/platypush.git
|
2024-09-02 02:31:11 +02:00
|
|
|
|
2024-11-10 22:31:18 +01:00
|
|
|
if [[ "$branch" == "master" ]]; then
|
2024-09-02 02:31:11 +02:00
|
|
|
git pull --rebase github "${branch}" || echo "No such branch on Github"
|
|
|
|
fi
|
2024-05-23 00:17:55 +02:00
|
|
|
|
|
|
|
# Push the changes to the GitHub mirror
|
2024-09-02 02:31:11 +02:00
|
|
|
git push -f --all -v github
|
2024-07-27 15:38:41 +02:00
|
|
|
git push --tags -v github
|