Skip to content

Commit

Permalink
Compatibility and update to log/docs (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
RoanPaulus authored Sep 25, 2024
1 parent c05a6fa commit 173a042
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ sh scripts/run-dev.sh
### Release to production
```
~ cd scripts
~ sh release.sh --minor [--major [--patch]]
~ ./release.sh --minor [--major [--patch]]
```
20 changes: 9 additions & 11 deletions scripts/release.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

if [ $# -eq 0 ]; then
echo "Missing flag. Use --minor, --major or --patch"
exit 1
fi

BRANCH="production-release"

git fetch origin && \
Expand All @@ -13,25 +18,20 @@ echo "Fetched origin, created release-branch."
NEW_TAG_D="-1"
NEW_TAG=$NEW_TAG_D

if [ $# -eq 0 ]; then
echo "No arguments provided"
exit 1
fi

for cmd in "$@"
do
case $cmd in
"--major")
echo "Incrementing Major Version"
NEW_TAG=$(sh ./semver.sh -v major)
NEW_TAG=$(./semver.sh -v major)
;;
"--minor")
echo "Incrementing Minor Version"
NEW_TAG=$(sh ./semver.sh -v minor)
NEW_TAG=$(./semver.sh -v minor)
;;
"--patch")
echo "Incrementing Patch Version"
NEW_TAG=$(sh ./semver.sh -v patch)
NEW_TAG=$(./semver.sh -v patch)
;;
*)
echo "No version specified"
Expand All @@ -54,6 +54,4 @@ git tag -a "$NEW_TAG" -m "Production ${NEW_TAG}" && \
echo "Pushing branch $RELEASE_BRANCH" && \
git push origin --follow-tags "$RELEASE_BRANCH" && \

echo "Don't forget to merge to main and Approve the deploy to the production environment!"

exit 0
exit 0
Empty file modified scripts/semver.sh
100644 → 100755
Empty file.

0 comments on commit 173a042

Please sign in to comment.