Improve generate-tarball.sh
This commit is contained in:
parent
625be8f822
commit
42a5f55adc
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# This commit refers to the state of the sources when they were published to
|
||||
# Maven Central
|
||||
git_tag='2d846a848c8d79283ab2ca8ffaa492ebbd505aec'
|
||||
@ -7,18 +9,19 @@ version="$(sed -n 's/Version:\s*//p' *.spec)"
|
||||
|
||||
# Retrieve and set version
|
||||
git clone https://github.com/cbeust/jcommander.git
|
||||
cd jcommander
|
||||
|
||||
pushd jcommander
|
||||
git reset --hard "${git_tag}"
|
||||
|
||||
# Clean
|
||||
find -name *.jar -delete
|
||||
find -name *.class -delete
|
||||
find -name '*.jar' -delete
|
||||
find -name '*.class' -delete
|
||||
rm -rf gradle* kobalt* lib
|
||||
|
||||
rm -rf .git
|
||||
popd
|
||||
|
||||
# Pack into tarball
|
||||
cd ..
|
||||
mv jcommander beust-jcommander-"${version}"
|
||||
tar -cvf beust-jcommander-"${version}".tar.gz beust-jcommander-"${version}"/
|
||||
rm -rf beust-jcommander-"${version}"
|
||||
|
Loading…
Reference in New Issue
Block a user