Also check if the passed version matches the version pattern
<major>.<minor>.<micro>.<qualifier>-<classifier>
Change-Id: Ib7edf51fb5e89232909611de5b4811a62b4f3953
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
ask(prompt) {|q| q.echo = false}
end
-version = '3.3.0.201403021825-r'.freeze
+version = ARGV[0].freeze
+if version =~ /\A(\d+\.\d+\.\d+)\.(\d{12})-(m\d|rc\d|r)\Z/
+ printf "version %s qualifier %s classifier %s\n", $1, $2, $3
+else
+ printf "invalid version %s\n", version
+ abort
+end
+
url = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
repositoryId = 'sonatype-nexus-staging'
puts "gpg passphrase ?"
#!/usr/bin/env ruby
-version = '3.3.0.201403021825-r'.freeze
+version = ARGV[0].freeze
+if version =~ /\A(\d+\.\d+\.\d+)\.(\d{12})-(m\d|rc\d|r)\Z/
+ printf "version %s qualifier %s classifier %s\n", $1, $2, $3
+else
+ printf "invalid version %s\n", version
+ abort
+end
+
group = 'org.eclipse.jgit'
artifacts = [group,
group + '.ant',