minecraft-source/create-branch.sh

17 lines
309 B
Bash
Raw Normal View History

2020-07-21 04:18:38 +01:00
#!/usr/bin/env bash
2020-07-21 05:22:15 +01:00
# USAGE: bash create-branch.sh <version> <branch_flags>
2020-07-21 04:18:38 +01:00
# new branch
echo "Creating branch '$1'"
2020-07-21 05:22:15 +01:00
git branch -D $1 || true
2020-07-21 05:25:16 +01:00
git checkout $2 $1
2020-07-21 04:18:38 +01:00
echo "Committing changes..."
2020-07-21 04:57:48 +01:00
git add src
2020-07-21 05:15:33 +01:00
git add client.txt
2020-07-21 04:18:38 +01:00
git commit -m "Update to $1"
echo "Pushing to origin..."
2020-07-21 05:27:55 +01:00
git push --force origin $1