File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -65,14 +65,20 @@ tasks:
6565 release :
6666 desc : Create a tag on the current commit and push it to the remote to create the release
6767 cmds :
68- - |
69- if [ -z "{{.CLI_ARGS}}" ]; then
70- echo "Error: Version argument is required. Usage: task release -- <version>"
68+ - echo "Create tag version {{ .TAG }}"
69+ - git tag "{{ .TAG }}"
70+ - git push origin "{{ .TAG }}"
71+ vars :
72+ TAG :
73+ sh : |
74+ TAGARG="{{.CLI_ARGS}}"
75+ if ! echo "$TAGARG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+.*$'; then
76+ echo "Error: Version must match pattern 'v[0-9]+.[0-9]+.[0-9]+*'"
77+ echo " Invalid version: $TAGARG"
78+ echo " Valid examples: v1.0.0, v2.1.3, v1.0.0-beta, v3.2.1-rc.1"
7179 exit 1
7280 fi
73- - git tag -a "{{.CLI_ARGS}}" -m "Release {{.CLI_ARGS}}"
74- - git push origin "{{.CLI_ARGS}}"
75-
81+ echo $TAGARG
7682 board:install :
7783 desc : Install arduino-router on the board
7884 interactive : true
You can’t perform that action at this time.
0 commit comments