summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2014-06-06 01:24:03 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2014-06-06 15:41:22 +0200
commitbe25ecb393d89c62d70d13d7c10f08dec34d46f1 (patch)
tree00b5028ff924932ae4239d1bf1dac280f419d9fa /tools
parent4dc3ba432704a77bf308c1446ee04937bf400217 (diff)
downloadjgit-be25ecb393d89c62d70d13d7c10f08dec34d46f1.tar.gz
jgit-be25ecb393d89c62d70d13d7c10f08dec34d46f1.zip
Enable passing version number to maven central scripts
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/maven-central/deploy.rb9
-rwxr-xr-xtools/maven-central/download.rb9
2 files changed, 16 insertions, 2 deletions
diff --git a/tools/maven-central/deploy.rb b/tools/maven-central/deploy.rb
index 44abccfc92..929af9cd7e 100755
--- a/tools/maven-central/deploy.rb
+++ b/tools/maven-central/deploy.rb
@@ -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 ?"
diff --git a/tools/maven-central/download.rb b/tools/maven-central/download.rb
index 949e6242fa..fc06f7da60 100755
--- a/tools/maven-central/download.rb
+++ b/tools/maven-central/download.rb
@@ -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',