Skip to content

Commit c6dabc6

Browse files
fix(version-bump): remove redundant checks
1 parent faa11ff commit c6dabc6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/scripts/version-bump.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ update_readme_version() {
7878
}
7979
}
8080
/^[[:space:]]*version[[:space:]]*=/ {
81-
if (in_target_module && $1 == "version") {
82-
match($0, /^[[:space:]]*/)
81+
if (in_target_module) {
82+
match($0, /^[[:space]]*/
8383
indent = substr($0, 1, RLENGTH)
8484
print indent "version = \"" new_version "\""
8585
in_target_module = 0
@@ -153,7 +153,7 @@ main() {
153153
if [ -z "$latest_tag" ]; then
154154
if [ -f "$readme_path" ] && grep -q '^[[:space:]]*version[[:space:]]*=' "$readme_path"; then
155155
local readme_version
156-
readme_version=$(awk '/^[[:space:]]*version[[:space:]]*=/ && $1 == "version" { match($0, /"[^"]*"/); print substr($0, RSTART+1, RLENGTH-2); exit }' "$readme_path")
156+
readme_version=$(awk '/^[[:space:]]*version[[:space:]]*=/ { match($0, /"[^"]*"/); print substr($0, RSTART+1, RLENGTH-2); exit }' "$readme_path")
157157
echo "No git tag found, but README shows version: $readme_version"
158158

159159
if ! validate_version "$readme_version"; then

0 commit comments

Comments
 (0)