2018-07-30 17:31:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-08-15 08:14:53 +00:00
|
|
|
# This commit refers to the state of the sources when they were published to
|
|
|
|
# Maven Central
|
|
|
|
git_tag='2d846a848c8d79283ab2ca8ffaa492ebbd505aec'
|
2018-07-30 17:31:48 +00:00
|
|
|
version="$(sed -n 's/Version:\s*//p' *.spec)"
|
|
|
|
|
2019-08-15 08:14:53 +00:00
|
|
|
# Retrieve and set version
|
|
|
|
git clone https://github.com/cbeust/jcommander.git
|
|
|
|
cd jcommander
|
|
|
|
git reset --hard "${git_tag}"
|
2018-07-30 17:31:48 +00:00
|
|
|
|
2019-08-15 08:14:53 +00:00
|
|
|
# Clean
|
|
|
|
find -name *.jar -delete
|
|
|
|
find -name *.class -delete
|
|
|
|
rm -rf gradle* kobalt* lib
|
2018-07-30 17:31:48 +00:00
|
|
|
|
2019-08-15 08:14:53 +00:00
|
|
|
rm -rf .git
|
2018-07-30 17:31:48 +00:00
|
|
|
|
2019-08-15 08:14:53 +00:00
|
|
|
# Pack into tarball
|
2018-07-30 17:31:48 +00:00
|
|
|
cd ..
|
2019-08-15 08:14:53 +00:00
|
|
|
mv jcommander beust-jcommander-"${version}"
|
|
|
|
tar -cvf beust-jcommander-"${version}".tar.gz beust-jcommander-"${version}"/
|
|
|
|
rm -rf beust-jcommander-"${version}"
|