mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add ability to force tag
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
1849485f3a
commit
2dbff02767
2
Makefile
2
Makefile
@ -44,7 +44,7 @@ release-version:
|
|||||||
|
|
||||||
.PHONY: tag-release
|
.PHONY: tag-release
|
||||||
tag-release:
|
tag-release:
|
||||||
scripts/tag-release.sh
|
scripts/tag-release.sh $(CMD_ARGS)
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test: binaries/client
|
test: binaries/client
|
||||||
|
|||||||
@ -1,10 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
key="$1"
|
||||||
|
|
||||||
|
case $key in
|
||||||
|
-f|--force)
|
||||||
|
FORCE="--force"
|
||||||
|
shift # past argument
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
if [[ `git branch --show-current` =~ ^release/v ]]
|
if [[ `git branch --show-current` =~ ^release/v ]]
|
||||||
then
|
then
|
||||||
VERSION_STRING=$(cat package.json | jq '.version' -r | xargs printf "v%s")
|
VERSION_STRING=$(cat package.json | jq '.version' -r | xargs printf "v%s")
|
||||||
git tag ${VERSION_STRING}
|
git tag ${VERSION_STRING} ${FORCE}
|
||||||
git push ${GIT_REMOTE:-origin} ${VERSION_STRING}
|
git push ${GIT_REMOTE:-origin} ${VERSION_STRING} ${FORCE}
|
||||||
else
|
else
|
||||||
echo "You must be in a release branch"
|
echo "You must be in a release branch"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user