Skip to content

Commit

Permalink
Handle SNAPSHOT versioning different for rpm packages
Browse files Browse the repository at this point in the history
Fixes #4006.
  • Loading branch information
ripcurlx committed Feb 26, 2020
1 parent db0c76e commit 91c7906
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions desktop/package/linux/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# - Ensure JAVA_HOME below is pointing to OracleJDK 10 directory

version=1.2.7-SNAPSHOT
version_base=$(echo $version | awk -F'[_-]' '{print $1}')
if [ ! -f "$JAVA_HOME/bin/javapackager" ]; then
if [ -d "/usr/lib/jvm/jdk-10.0.2" ]; then
JAVA_HOME=/usr/lib/jvm/jdk-10.0.2
Expand Down Expand Up @@ -120,7 +121,7 @@ fi
echo Generating rpm package
$JAVA_HOME/bin/javapackager \
-deploy \
-BappVersion=$version \
-BappVersion=$version_base \
-Bcategory=Network \
[email protected] \
-BlicenseType=GPLv3 \
Expand All @@ -138,8 +139,8 @@ $JAVA_HOME/bin/javapackager \
-outfile Bisq-$version \
-v

if [ ! -f "$base_dir/desktop/package/linux/bisq-$version-1.x86_64.rpm" ]; then
echo No rpm file found at $base_dir/desktop/package/linux/bisq-$version-1.x86_64.rpm
if [ ! -f "$base_dir/desktop/package/linux/bisq-$version_base-1.x86_64.rpm" ]; then
echo No rpm file found at $base_dir/desktop/package/linux/bisq-$version_base-1.x86_64.rpm
exit 3
fi

Expand All @@ -153,10 +154,10 @@ echo SHA256 of $base_dir/desktop/package/linux/Bisq-$version.deb:
shasum -a256 $base_dir/desktop/package/linux/Bisq-$version.deb | awk '{print $1}' | tee $base_dir/desktop/package/linux/Bisq-$version.deb.txt

# FIXME: My Ubuntu somehow also deletes the lower case file
# if [ -f "$base_dir/desktop/package/linux/Bisq-$version-1.x86_64.rpm" ]; then
# rm "$base_dir/desktop/package/linux/Bisq-$version-1.x86_64.rpm"
# if [ -f "$base_dir/desktop/package/linux/Bisq-$version_base-1.x86_64.rpm" ]; then
# rm "$base_dir/desktop/package/linux/Bisq-$version_base-1.x86_64.rpm"
# fi
mv $base_dir/desktop/package/linux/bisq-$version-1.x86_64.rpm $base_dir/desktop/package/linux/Bisq-$version.rpm
mv $base_dir/desktop/package/linux/bisq-$version_base-1.x86_64.rpm $base_dir/desktop/package/linux/Bisq-$version.rpm

echo SHA256 of $base_dir/desktop/package/linux/Bisq-$version.rpm:
shasum -a256 $base_dir/desktop/package/linux/Bisq-$version.rpm | awk '{print $1}' | tee $base_dir/desktop/package/linux/Bisq-$version.rpm.txt
Expand Down

0 comments on commit 91c7906

Please sign in to comment.