Skip to content

Commit dc1b8f1

Browse files
author
Kim Neunert
committed
documentation and further polishing
1 parent b415b00 commit dc1b8f1

File tree

5 files changed

+50
-22
lines changed

5 files changed

+50
-22
lines changed

docs/release-guide.md

+38-9
Original file line numberDiff line numberDiff line change
@@ -73,30 +73,59 @@ For details look at `.gitlab-ci.yml`
7373

7474
## MacOS
7575

76-
Ideally, directly after the tag is created, start with the MacOS release. This has to be done manually, for now. There is a script for this:
76+
Ideally, directly after the tag is created, start with the MacOS release. As the binaries of x86/arm64 are not compatible with each other, we need to build on two MacOS architectures.This has to be done manually, for now. There is a script for this. Start with the build on x86:
77+
78+
### MacOS x64 build
79+
80+
```bash
81+
./utils/build-osx.sh --version v2.0.5-pre4 --appleid "Satoshi Nakamoto (appleid)" --mail "satoshi@gmx.com" specterd package upload
82+
```
83+
84+
This will create three artifacts on github:
85+
* specterd-v2.0.5-pre4-osx_x64.zip
86+
* SHA256SUMS-macos_x64
87+
* SHA256SUMS-macos_x64.asc
88+
89+
### MacOS arm64 build
90+
91+
The electron application will get built on the arm architecture. As it needs to store the sha256 hash in the electron-app, the make-hash target
92+
will not only hash the specterd but also download the other specterd and hash it.
7793

7894
```bash
79-
./utils/build-osx.sh --version v1.13.1 --appleid "Satoshi Nakamoto (appleid)" --mail "satoshi@gmx.com" make-hash specterd electron sign upload
95+
./utils/build-osx.sh --version v2.0.5-pre4 --appleid "Satoshi Nakamoto (appleid)" --mail "satoshi@gmx.com" specterd make-hash electron sign package upload
8096
```
8197

82-
This script also runs `github.py upload `, so two more binares and the hash and signature files are uploaded to GitHub:
98+
This will create three artifacts on github:
99+
* Specter-v2.0.5-pre4.dmg
100+
* specterd-v2.0.5-pre4-osx_arm64.zip
101+
* SHA256SUMS-macos_arm64
102+
* SHA256SUMS-macos_arm64.asc
83103

84-
- Specter-v1.13.1.dmg
85-
- specterd-v1.13.1-osx.zip
86-
- SHA256SUMS-macos
87-
- SHA256SUMS-macos.asc
88104

89105
## GitLab - post releasing
90106

91107
Back to GitLab, the final stage is "post releasing".
92108

93-
In this stage, the invididual SHA256-hashes and signatures are combined into two final files:
109+
### release_signatures
110+
111+
In this job, the individual SHA256-hashes and signatures are combined into two final files:
94112

95113
- SHA256SUMS
96114
- SHA256SUMS.asc
97115

98116
Everything, apart from the MacOS files, are pulled from the GitLab environment, the MacOS files from GitHub.
99-
Don't forget to delete the two MacOS files (`SHA256SUMS-macos` and `SHA256SUMS-macos.asc`) on the GitHub release page in the end.
117+
Don't forget to delete the four MacOS files (`SHA256SUMS-macos_arm64` and `SHA256SUMS-macos_arm64.asc` and the two corresponding `_x64` files) on the GitHub release page in the end.
118+
119+
This is difficult to automate as sometimes the manual steps has not succeeded while generating the SHASUM-files. As a result, those hashes are not included. So you might want to run this again. And you can, just delete the two generated files - `SHA256SUMS` and `SHA256SUMS.asc` and run the job again.
120+
121+
### release_docker
122+
123+
There are docker images created by the awesome [Chiang Mai LN dev](https://github.com/lncm/docker-specter-desktop). So the task of this job is to trigger their build-system which is done via `utils/trigger_docker_build.sh`. A prerequisite of this is a token in order to authenticate. That token is from Aaron, one of the maintainers of that repo, and can be found in the gitlab variables section of the CI/CD configuration.
124+
125+
### tag_specterext_dummy_repo
126+
127+
Sometimes there are changes on the plugin architecture. In order to create a plugin, it's quite important to know which version of the plugin system should be used. Because of that, we simply assume that the master of the [specterext-dummy](https://github.com/cryptoadvance/specterext-dummy) repo is compatible with the current master which was just tagged with the new version.
128+
So this job will tag that repo with the same tag and the creation of a plugin will take the version into account.
100129

101130
## Trouble shooting
102131

pyinstaller/electron/downloadloc.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11

22
function orgName() {
3-
return "k9ert"
3+
// This can be changed in order to make download possible from other github orgs
4+
return "cryptoadvance"
45
}
56

67
function getDownloadLocation(version, platformname) {
7-
if (platformname != "darwin") {
8+
if (platformname != "osx") {
89
return `https://github.com/${orgName()}/specter-desktop/releases/download/${version}/specterd-${version}-${platformname}.zip`
910
}
1011
return `https://github.com/${orgName()}/specter-desktop/releases/download/${version}/specterd-${version}-${platformname}_${process.arch}.zip`
@@ -15,7 +16,8 @@ function appName() {
1516
}
1617

1718
module.exports = {
18-
getDownloadLocation: getDownloadLocation,
19-
appName: appName
19+
getDownloadLocation,
20+
appName,
21+
orgName
2022
}
2123

utils/build-common.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ function build_pypi_pckgs_and_install {
3131
pip3 install ./dist/cryptoadvance.specter-*.whl
3232
}
3333

34-
function specify_app_name {
35-
echo " --> Specify app_name"
34+
function configure {
35+
echo " --> Configure some variables"
3636
if [ -z "$app_name" ]; then
3737
# activate virtualenv. This is e.g. not needed in CI
3838
app_name=specter
@@ -48,13 +48,15 @@ function specify_app_name {
4848
export ARCH=$(node -e "console.log(process.arch)")
4949
export dist_mac_folder_name=mac-universal
5050
export CI_COMMIT_TAG=$version
51+
export CI_PROJECT_ROOT_NAMESPACE=$(node -e "const downloadloc = require('./pyinstaller/electron/downloadloc');console.log(downloadloc.orgName())")
5152

5253
echo specterd_filename=${specterd_filename}
5354
echo specterimg_filename=${specterimg_filename}
5455
echo pkg_filename=${pkg_filename}
5556
echo ARCH=$ARCH
5657
echo dist_mac_folder_name=$dist_mac_folder_name
5758
echo CI_COMMIT_TAG=$CI_COMMIT_TAG
59+
echo CI_PROJECT_ROOT_NAMESPACE=$CI_PROJECT_ROOT_NAMESPACE
5860

5961
}
6062

utils/build-osx.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,6 @@ while [[ $# -gt 0 ]]
219219
shift
220220
shift
221221
;;
222-
--gh-project)
223-
export CI_PROJECT_ROOT_NAMESPACE=$2
224-
shift
225-
shift
226-
;;
227222
specterd)
228223
build_specterd=True
229224
shift
@@ -270,7 +265,7 @@ echo " --> This build got triggered for version $version"
270265

271266
echo $version > pyinstaller/version.txt
272267

273-
specify_app_name
268+
configure
274269

275270
if [[ "$build_specterd" = "True" ]]; then
276271
create_virtualenv_for_pyinstaller

utils/build-unix.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ echo " --> This build got triggered for version $version"
142142
# This file gets further packaged up with the pyinstaller and will help specter to figure out which version it's running on
143143
echo $version > pyinstaller/version.txt
144144

145-
specify_app_name
145+
configure
146146

147147
if [[ "$build_specterd" = "True" ]]; then
148148
create_virtualenv_for_pyinstaller

0 commit comments

Comments
 (0)