mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Merge pull request #6122 from ghubstan/build-api-release-zipfiles
Create API cli and daemon releases as zip archives
This commit is contained in:
commit
c5de527596
71
cli/package/create-cli-dist.sh
Executable file
71
cli/package/create-cli-dist.sh
Executable file
@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
VERSION="$1"
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
VERSION="SNAPSHOT"
|
||||
fi
|
||||
|
||||
export BISQ_RELEASE_NAME="bisq-cli-$VERSION"
|
||||
export BISQ_RELEASE_ZIP_NAME="$BISQ_RELEASE_NAME.zip"
|
||||
|
||||
export GRADLE_DIST_NAME="cli.tar"
|
||||
export GRADLE_DIST_PATH="../build/distributions/$GRADLE_DIST_NAME"
|
||||
|
||||
arrangegradledist() {
|
||||
# Arrange $BISQ_RELEASE_NAME directory structure to contain a runnable
|
||||
# jar at the top-level, and a lib dir containing dependencies:
|
||||
# .
|
||||
# |
|
||||
# |__ cli.jar
|
||||
# |__ lib
|
||||
# |__ |__ dep1.jar
|
||||
# |__ |__ dep2.jar
|
||||
# |__ |__ ...
|
||||
# Copy the build's distribution tarball to this directory.
|
||||
cp -v $GRADLE_DIST_PATH .
|
||||
# Create a clean directory to hold the tarball's content.
|
||||
rm -rf $BISQ_RELEASE_NAME
|
||||
mkdir $BISQ_RELEASE_NAME
|
||||
# Extract the tarball's content into $BISQ_RELEASE_NAME.
|
||||
tar -xf $GRADLE_DIST_NAME -C $BISQ_RELEASE_NAME
|
||||
cd $BISQ_RELEASE_NAME
|
||||
# Rearrange $BISQ_RELEASE_NAME contents: move the lib directory up one level.
|
||||
mv -v cli/lib .
|
||||
# Rearrange $BISQ_RELEASE_NAME contents: remove the cli/bin and cli directories.
|
||||
rm -rf cli
|
||||
# Rearrange $BISQ_RELEASE_NAME contents: move the lib/cli.jar up one level.
|
||||
mv -v lib/cli.jar .
|
||||
}
|
||||
|
||||
writemanifest() {
|
||||
# Make the cli.jar runnable, and define its dependencies in a MANIFEST.MF update.
|
||||
echo "Main-Class: bisq.cli.CliMain" > manifest-update.txt
|
||||
printf "Class-Path: " >> manifest-update.txt
|
||||
for file in lib/*
|
||||
do
|
||||
# Each new line in the classpath must be preceded by two spaces.
|
||||
printf " %s\n" "$file" >> manifest-update.txt
|
||||
done
|
||||
}
|
||||
|
||||
updatemanifest() {
|
||||
# Append contents of to cli.jar's MANIFEST.MF.
|
||||
jar uvfm cli.jar manifest-update.txt
|
||||
}
|
||||
|
||||
ziprelease() {
|
||||
cd ..
|
||||
zip -r $BISQ_RELEASE_ZIP_NAME $BISQ_RELEASE_NAME/lib $BISQ_RELEASE_NAME/cli.jar
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
rm -v ./$GRADLE_DIST_NAME
|
||||
rm -r ./$BISQ_RELEASE_NAME
|
||||
}
|
||||
|
||||
arrangegradledist
|
||||
writemanifest
|
||||
updatemanifest
|
||||
ziprelease
|
||||
cleanup
|
||||
|
71
daemon/package/create-daemon-dist.sh
Executable file
71
daemon/package/create-daemon-dist.sh
Executable file
@ -0,0 +1,71 @@
|
||||
#! /bin/bash
|
||||
|
||||
VERSION="$1"
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
VERSION="SNAPSHOT"
|
||||
fi
|
||||
|
||||
export BISQ_RELEASE_NAME="bisq-daemon-$VERSION"
|
||||
export BISQ_RELEASE_ZIP_NAME="$BISQ_RELEASE_NAME.zip"
|
||||
|
||||
export GRADLE_DIST_NAME="daemon.tar"
|
||||
export GRADLE_DIST_PATH="../build/distributions/$GRADLE_DIST_NAME"
|
||||
|
||||
arrangegradledist() {
|
||||
# Arrange $BISQ_RELEASE_NAME directory structure to contain a runnable
|
||||
# jar at the top-level, and a lib dir containing dependencies:
|
||||
# .
|
||||
# |
|
||||
# |__ daemon.jar
|
||||
# |__ lib
|
||||
# |__ |__ dep1.jar
|
||||
# |__ |__ dep2.jar
|
||||
# |__ |__ ...
|
||||
# Copy the build's distribution tarball to this directory.
|
||||
cp -v $GRADLE_DIST_PATH .
|
||||
# Create a clean directory to hold the tarball's content.
|
||||
rm -rf $BISQ_RELEASE_NAME
|
||||
mkdir $BISQ_RELEASE_NAME
|
||||
# Extract the tarball's content into $BISQ_RELEASE_NAME.
|
||||
tar -xf $GRADLE_DIST_NAME -C $BISQ_RELEASE_NAME
|
||||
cd $BISQ_RELEASE_NAME
|
||||
# Rearrange $BISQ_RELEASE_NAME contents: move the lib directory up one level.
|
||||
mv -v daemon/lib .
|
||||
# Rearrange $BISQ_RELEASE_NAME contents: remove the daemon/bin and daemon directories.
|
||||
rm -rf daemon
|
||||
# Rearrange $BISQ_RELEASE_NAME contents: move the lib/daemon.jar up one level.
|
||||
mv -v lib/daemon.jar .
|
||||
}
|
||||
|
||||
writemanifest() {
|
||||
# Make the daemon.jar runnable, and define its dependencies in a MANIFEST.MF update.
|
||||
echo "Main-Class: bisq.daemon.app.BisqDaemonMain" > manifest-update.txt
|
||||
printf "Class-Path: " >> manifest-update.txt
|
||||
for file in lib/*
|
||||
do
|
||||
# Each new line in the classpath must be preceded by two spaces.
|
||||
printf " %s\n" "$file" >> manifest-update.txt
|
||||
done
|
||||
}
|
||||
|
||||
updatemanifest() {
|
||||
# Append contents of to daemon.jar's MANIFEST.MF.
|
||||
jar uvfm daemon.jar manifest-update.txt
|
||||
}
|
||||
|
||||
ziprelease() {
|
||||
cd ..
|
||||
zip -r $BISQ_RELEASE_ZIP_NAME $BISQ_RELEASE_NAME/lib $BISQ_RELEASE_NAME/daemon.jar
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
rm -v ./$GRADLE_DIST_NAME
|
||||
rm -r ./$BISQ_RELEASE_NAME
|
||||
}
|
||||
|
||||
arrangegradledist
|
||||
writemanifest
|
||||
updatemanifest
|
||||
ziprelease
|
||||
cleanup
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
cd ../../
|
||||
|
||||
version="1.8.4-SNAPSHOT"
|
||||
version="1.8.4"
|
||||
|
||||
target_dir="releases/$version"
|
||||
|
||||
@ -20,6 +20,25 @@ rm -r $target_dir
|
||||
|
||||
mkdir -p $target_dir
|
||||
|
||||
# Save the current working dir (assumed to be "desktop"), and
|
||||
# build the API daemon and cli distributions in the target dir.
|
||||
script_working_directory=$(pwd)
|
||||
# Copy the build's cli and daemon tarballs to target_dir.
|
||||
cp -v ../cli/build/distributions/cli.tar $target_dir
|
||||
cp -v ../daemon/build/distributions/daemon.tar $target_dir
|
||||
# Copy the cli and daemon zip creation scripts to target_dir.
|
||||
cp -v ../cli/package/create-cli-dist.sh $target_dir
|
||||
cp -v ../daemon/package/create-daemon-dist.sh $target_dir
|
||||
# Run the zip creation scripts in target_dir.
|
||||
cd $target_dir
|
||||
./create-cli-dist.sh $version
|
||||
./create-daemon-dist.sh $version
|
||||
# Clean up.
|
||||
rm -v create-cli-dist.sh
|
||||
rm -v create-daemon-dist.sh
|
||||
# Done building cli and daemon zip files; return to the original current working directory.
|
||||
cd "$script_working_directory"
|
||||
|
||||
# sig key mkarrer
|
||||
cp "$target_dir/../../package/F379A1C6.asc" "$target_dir/"
|
||||
# sig key cbeams
|
||||
@ -47,6 +66,9 @@ cp "$win64/$exe" "$target_dir/$exe64"
|
||||
rpi="jar-lib-for-raspberry-pi-$version.zip"
|
||||
cp "$macos/$rpi" "$target_dir/"
|
||||
|
||||
cli="bisq-cli-$version.zip"
|
||||
daemon="bisq-daemon-$version.zip"
|
||||
|
||||
# create file with jar signatures
|
||||
cat "$macos/desktop-$version-all-mac.jar.SHA-256" \
|
||||
"$linux64/desktop-$version-all-linux.jar.SHA-256" \
|
||||
@ -59,11 +81,13 @@ sed -i '' '3 s_^_windows: _' "$target_dir/Bisq-$version.jar.txt"
|
||||
cd "$target_dir"
|
||||
|
||||
echo Create signatures
|
||||
gpg --digest-algo SHA256 --local-user $BISQ_GPG_USER --output $dmg.asc --detach-sig --armor $dmg
|
||||
gpg --digest-algo SHA256 --local-user $BISQ_GPG_USER --output $deb64.asc --detach-sig --armor $deb64
|
||||
gpg --digest-algo SHA256 --local-user $BISQ_GPG_USER --output $rpm64.asc --detach-sig --armor $rpm64
|
||||
gpg --digest-algo SHA256 --local-user $BISQ_GPG_USER --output $exe64.asc --detach-sig --armor $exe64
|
||||
gpg --digest-algo SHA256 --local-user $BISQ_GPG_USER --output $rpi.asc --detach-sig --armor $rpi
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$dmg.asc" --detach-sig --armor "$dmg"
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$deb64.asc" --detach-sig --armor "$deb64"
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$rpm64.asc" --detach-sig --armor "$rpm64"
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$exe64.asc" --detach-sig --armor "$exe64"
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$rpi.asc" --detach-sig --armor "$rpi"
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$cli.asc" --detach-sig --armor "$cli"
|
||||
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$daemon.asc" --detach-sig --armor "$daemon"
|
||||
|
||||
echo Verify signatures
|
||||
gpg --digest-algo SHA256 --verify $dmg{.asc*,}
|
||||
@ -71,6 +95,8 @@ gpg --digest-algo SHA256 --verify $deb64{.asc*,}
|
||||
gpg --digest-algo SHA256 --verify $rpm64{.asc*,}
|
||||
gpg --digest-algo SHA256 --verify $exe64{.asc*,}
|
||||
gpg --digest-algo SHA256 --verify $rpi{.asc*,}
|
||||
gpg --digest-algo SHA256 --verify $cli{.asc*,}
|
||||
gpg --digest-algo SHA256 --verify $daemon{.asc*,}
|
||||
|
||||
mkdir $win64/$version
|
||||
cp -r . $win64/$version
|
||||
|
Loading…
Reference in New Issue
Block a user