Skip to content

Commit b3827a5

Browse files
authored
Merge pull request #777 from Fryguy/version_format
Check version format during release
2 parents 54b3f2e + 9ce8997 commit b3827a5

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)