Skip to content

Commit 45aba1f

Browse files
committed
build: include release script in repo
1 parent 8c6c1f0 commit 45aba1f

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,3 @@ luac.out
4141

4242
# Vim tag files
4343
tags
44-
45-
# Scripts used for repo maintenance
46-
*.sh

release.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#/bin/bash
2+
VERSION=$1
3+
MAJOR_VERSION="v1.x"
4+
git fetch
5+
git checkout main
6+
git pull
7+
echo "Merging to ${MAJOR_VERSION}"
8+
git checkout $MAJOR_VERSION
9+
git pull
10+
if git merge --ff-only origin/main; then
11+
git push
12+
git tag -a $VERSION -m "Release ${VERSION}"
13+
git push origin $VERSION
14+
echo "Creating Release"
15+
gh release create $VERSION --title "Release $VERSION" --notes ""
16+
else
17+
echo "RELEASE FAILED! Could not fast-forward release to $MAJOR_VERSION"
18+
fi
19+
git checkout main

0 commit comments

Comments
 (0)