Skip to content

Commit 39f79e2

Browse files
committed
Typo when creating first tag of repo
1 parent 3c74c1a commit 39f79e2

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

action/action.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,22 +131,22 @@ if [[ -z "${latest_tag}" ]]; then
131131
echo "No valid SemVer tags found. Creating initial tag..."
132132

133133
# Always use 'v' prefix for initial tag (standard convention)
134-
latest_tag="v0.0.0"
134+
latest_tag="0.0.0"
135135
echo "Using initial tag: $latest_tag"
136136
else
137137
echo -e "\nLast tag is: $latest_tag\n"
138138
fi
139139

140140
# Generate changelog with git-cliff
141-
if [[ "$latest_tag" == "v0.0.0" ]]; then
141+
if [[ "$latest_tag" == "0.0.0" ]]; then
142142
# For initial tag, get all commits
143143
changelog="$(git cliff --config /action/config.toml)"
144144
else
145145
changelog="$(git cliff --config /action/config.toml "${latest_tag}"..HEAD)"
146146
fi
147147
changelog=$(echo "${changelog}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')
148148

149-
if [[ -z "${changelog}" && "$latest_tag" != "v0.0.0" ]]; then
149+
if [[ -z "${changelog}" && "$latest_tag" != "0.0.0" ]]; then
150150
echo "Changelog is empty. Please ensure you have new commits outside latest tag"
151151
exit 0
152152
fi
@@ -157,21 +157,21 @@ if [ "$PREVIEW" = true ]; then
157157
exit 0
158158
fi
159159

160-
if [[ ${latest_tag:0:1} == "v" ]]; then
161-
starts_with_v=true
162-
else
163-
starts_with_v=false
164-
fi
165-
166160
# Use custom tag or provide choice for user to update.
167161
if [[ -n "${CUSTOM_TAG}" ]]; then
168162
NEW_TAG=${CUSTOM_TAG}
169163
else
170164
# Handle initial tag case
171-
if [[ "$latest_tag" == "v0.0.0" ]]; then
165+
if [[ "$latest_tag" == "0.0.0" ]]; then
172166
# Creating initial release tag
173-
NEW_TAG="v0.1.0"
167+
NEW_TAG="0.1.0"
174168
else
169+
if [[ ${latest_tag:0:1} == "v" ]]; then
170+
starts_with_v=true
171+
else
172+
starts_with_v=false
173+
fi
174+
175175
# strip V from tag
176176
major=$(echo "$latest_tag" | cut -d'.' -f1)
177177
major=${major#v}

0 commit comments

Comments
 (0)