Skip to content

Commit

Permalink
- fix directory management in finalize.sh release script
Browse files Browse the repository at this point in the history
 - updated docs with important notes for release managers
 - fix docs to note that the finalize script needs to be run for every
   platform
 - ensure cli and daemon and built -> cli and daemon binaries get generated and included in the release now
  • Loading branch information
rodvar committed Sep 17, 2024
1 parent 66f9648 commit 926f9a1
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 18 deletions.
50 changes: 33 additions & 17 deletions desktop/package/macosx/finalize.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash

cd ../../
cd ../../../

version="1.9.17-SNAPSHOT"

target_dir="releases/$version"
target_dir="desktop/releases/$version"

# Set BISQ_GPG_USER as environment var to the email address used for gpg signing. e.g. [email protected]
# Set BISQ_VM_PATH as environment var to the directory where your shared folders for virtual box are residing
Expand All @@ -20,33 +20,49 @@ rm -r $target_dir

mkdir -p $target_dir

# Save the current working dir (assumed to be "desktop"), and
# make sure the releases are ready
./gradlew cli:build
./gradlew daemon:build

# Save the current working dir (assumed to be "root"), and
# build the API daemon and cli distributions in the target dir.
script_working_directory=$(pwd)
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
cp -v ./cli/build/distributions/cli.tar $target_dir
cp -v ./daemon/build/distributions/daemon.tar $target_dir

DIR=(`pwd`)
# Execute and copy results
cd ./cli/package
./create-cli-dist.sh $version
cd $DIR
cp -v ./cli/package/* $target_dir
rm -vf ./cli/package/bisq*

cd ./daemon/package
./create-daemon-dist.sh $version
cd $DIR
cp -v ./daemon/package/* $target_dir
rm -vf ./daemon/package/bisq*

echo "cd into $target_dir"
cd $target_dir
# 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.
echo "cd into $script_working_directory"

cd "$script_working_directory"

# sig key Alejandro García
cp "$target_dir/../../package/E222AA02.asc" "$target_dir/"
cp -v "./desktop/package/E222AA02.asc" "$target_dir/"
# sig key Gabriel Bernard
cp "$target_dir/../../package/4A133008.asc" "$target_dir/"
cp -v "./desktop/package/4A133008.asc" "$target_dir/"
# sig key Christoph Atteneder
cp "$target_dir/../../package/29CDFD3B.asc" "$target_dir/"
cp -v "./desktop/package/29CDFD3B.asc" "$target_dir/"
# signing key
cp "$target_dir/../../package/signingkey.asc" "$target_dir/"
cp -v "./desktop/package/signingkey.asc" "$target_dir/"

dmg="Bisq-$version.dmg"
cp "$macos/$dmg" "$target_dir/"
Expand All @@ -71,7 +87,7 @@ cat "$macos/desktop-$version-all-mac.jar.SHA-256" \
"$linux64/desktop-$version-all-linux.jar.SHA-256" \
"$win64/desktop-$version-all-win.jar.SHA-256" > "$target_dir/Bisq-$version.jar.txt"

cd "$target_dir"
cd -v "$script_working_directory/$target_dir"

echo Create signatures
gpg --digest-algo SHA256 --local-user "$BISQ_GPG_USER" --output "$dmg.asc" --detach-sig --armor "$dmg"
Expand All @@ -92,4 +108,4 @@ gpg --digest-algo SHA256 --verify $daemon{.asc*,}
mkdir $win64/$version
cp -r . $win64/$version

open "."
open "./desktop/releases/$version"
7 changes: 6 additions & 1 deletion docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,15 @@ Build output expected:

* Install and run generated package

### Sign release on macOS
### Sign release & generate/include daemon and cli binaries

* Run [finalize.sh](https://github.com/bisq-network/bisq/blob/master/desktop/package/macosx/finalize.sh)

**PLEASE NOTE**:

- **Important**: even though finalize.sh script is on a macOS folder, **it should be ran for every platform**
- `finalize.sh` was designed to be ran from its own directory, so first make sure you cd into `./desktop/package/macosx` and set the environment variables it describes

Build output expected:

1. `E222AA02.asc` Sig key of Alejandro García
Expand Down

0 comments on commit 926f9a1

Please sign in to comment.