Skip to content

Commit 9ce8997

Browse files
committed
Check version format during release
1 parent c4ab657 commit 9ce8997

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/tasks/production.rake

+6
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,13 @@ namespace :production do
146146
$stderr.puts "ERROR: must specify the version number to deploy"
147147
exit 1
148148
end
149+
149150
version = "v#{version}" unless version.start_with?("v")
151+
unless version.match?(/^v\d+\.\d+\.\d+$/)
152+
$stderr.puts "ERROR: version is not in the expected format"
153+
exit 1
154+
end
155+
150156
version
151157
end
152158

0 commit comments

Comments
 (0)