]> source.dussan.org Git - jgit.git/commitdiff
Enable passing version number to maven central scripts 85/28085/3
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 5 Jun 2014 23:24:03 +0000 (01:24 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 6 Jun 2014 13:41:22 +0000 (15:41 +0200)
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>
tools/maven-central/deploy.rb
tools/maven-central/download.rb

index 44abccfc921e5fbe97e26100165e9ce54a34394c..929af9cd7e8527351730f3f80c8870d713e4a0d2 100755 (executable)
@@ -34,7 +34,14 @@ def get_passphrase(prompt="Enter your GPG Passphrase")
    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 ?"
index 949e6242faa4cea9d4753aa81d8cc6713bbaa224..fc06f7da60112f8c1cd1e6580591fbd85ae1eab0 100755 (executable)
@@ -1,5 +1,12 @@
 #!/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',