Skip to content

Commit 690e4fb

Browse files
authored
Merge branch 'master' into mm/jade-export-wallet-via-qr
2 parents 6a212bf + dddb7f1 commit 690e4fb

File tree

101 files changed

+17023
-3767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+17023
-3767
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pyinstaller/electron/downloadloc.js
2525
pyinstaller/electron/node_modules
2626
pyinstaller/electron/package-lock.json
2727
pyinstaller/electron/dist
28+
pyinstaller/electron/signing_logs
2829
pyinstaller/electron/fonts
2930
pyinstaller/electron/typography.css
3031
pyinstaller/electron/output.css

.gitlab-ci.yml

+82-85
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ variables:
88

99
cache:
1010
# enable per-job and per-branch caching
11-
- key:
12-
files:
11+
- key:
12+
files:
1313
- ./requirements.txt
1414
prefix: "$CI_JOB_NAME"
1515
paths:
@@ -25,11 +25,14 @@ before_script:
2525
- docker info || echo "no docker-command found" # Print out docker version for debugging
2626
- echo CI_PROJECT_NAMESPACE = $CI_PROJECT_NAMESPACE
2727
- echo CI_PROJECT_ROOT_NAMESPACE = $CI_PROJECT_ROOT_NAMESPACE
28-
- python -V # Print out python version for debugging
28+
- python -V # Print out python version for debugging
2929
- apt update
3030
- apt install -y libusb-1.0-0-dev libudev-dev # usb-support in hidapi
31-
# This doesn't get cached in gitlab but we don't need it anyway for now:
32-
# - ./tests/install_noded.sh --debug --elements compile
31+
# https://github.com/python-babel/babel/issues/990#issuecomment-1760326334
32+
- rm -f /etc/localtime
33+
- ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime
34+
# This doesn't get cached in gitlab but we don't need it anyway for now:
35+
# - ./tests/install_noded.sh --debug --elements compile
3336
- pip3 install --upgrade virtualenv
3437
- virtualenv --python=python3 .env
3538
- source .env/bin/activate
@@ -45,20 +48,20 @@ check:
4548
# So effectively, gitlab is currently only used for releasing.
4649

4750
.test:
48-
stage: testing
49-
# We assume here that people who want to get code into the master-branch are
50-
# relying on PRs and people who are working on gitlab-forks are working
51-
# on CI which probably want fast feedback on the releasing-jobs
52-
# and therefore skip the test-job
53-
# tem deactivated as it did not work as expected
54-
#only:
55-
# - $CI_PROJECT_ROOT_NAMESPACE =~ "cryptoadvance"
56-
script:
57-
- pip3 install -r requirements.txt
58-
- pip3 install -e .
59-
- pip3 install -e ".[test]"
60-
- python3 setup.py install # compiles babel stuff as well (might make pip install obsolete)
61-
- py.test --cov-report term --cov cryptoadvance
51+
stage: testing
52+
# We assume here that people who want to get code into the master-branch are
53+
# relying on PRs and people who are working on gitlab-forks are working
54+
# on CI which probably want fast feedback on the releasing-jobs
55+
# and therefore skip the test-job
56+
# tem deactivated as it did not work as expected
57+
#only:
58+
# - $CI_PROJECT_ROOT_NAMESPACE =~ "cryptoadvance"
59+
script:
60+
- pip3 install -r requirements.txt
61+
- pip3 install -e .
62+
- pip3 install -e ".[test]"
63+
- python3 setup.py install # compiles babel stuff as well (might make pip install obsolete)
64+
- py.test --cov-report term --cov cryptoadvance
6265

6366
.test-cypress:
6467
image: registry.gitlab.com/cryptoadvance/specter-desktop/cypress-python-jammy:v9.7.0
@@ -80,7 +83,7 @@ check:
8083

8184
release_pip:
8285
stage: releasing
83-
only:
86+
only:
8487
- tags
8588
script:
8689
- pip3 install -e .
@@ -109,8 +112,10 @@ release_pip:
109112

110113
release_binary_windows:
111114
stage: releasing
112-
only:
115+
only:
113116
- tags
117+
variables:
118+
GIT_DEPTH: 0 # Disable shallow clone to get all Git history
114119
tags:
115120
- windows
116121
before_script:
@@ -120,17 +125,17 @@ release_binary_windows:
120125
- pip install virtualenv
121126
- virtualenv --python=python3 .env
122127
- .\.env\Scripts\activate
123-
- pip3 install -e ".[test]"
124-
128+
- pip3 install -e ".[test]"
129+
125130
script:
126131
# This script won't execute if the script before that fails
127132
# No need to check the version-scheme again
128133

129-
- echo "Releasing for ${CI_PROJECT_ROOT_NAMESPACE}"
134+
- echo "Releasing for ${CI_PROJECT_ROOT_NAMESPACE}"
130135
- .\pyinstaller\build-win-ci.bat $CI_COMMIT_TAG
131136
- python ./utils/github.py upload ./pyinstaller/release/specterd-$CI_COMMIT_TAG-win64.zip
132137
- cd ./pyinstaller/release
133-
- python ..\..\utils\release-helper.py sha256sums specterd-$CI_COMMIT_TAG-win64.zip > SHA256SUMS-windows
138+
- python ..\..\utils\release_helper.py sha256sums specterd-$CI_COMMIT_TAG-win64.zip > SHA256SUMS-windows
134139
- type SHA256SUMS-windows
135140
- echo $GPG_PASSPHRASE | c:\Program` Files` `(x86`)\GnuPg\bin\gpg --detach-sign --armor --no-tty --batch --yes --passphrase-fd 0 --pinentry-mode loopback SHA256SUMS-windows
136141
artifacts:
@@ -140,28 +145,31 @@ release_binary_windows:
140145
expire_in: 1 day
141146
cache:
142147
key:
143-
files:
144-
- ./pyinstaller/electron/package-lock.json
145-
prefix: $CI_JOB_NAME
148+
files:
149+
- ./pyinstaller/electron/package-lock.json
150+
prefix: $CI_JOB_NAME
146151
paths:
147152
- ./pyinstaller/electron/node_modules
148153

149154
release_electron_linux_windows:
150155
image: registry.gitlab.com/cryptoadvance/specter-desktop/electron-builder:latest
151156
stage: releasing
152-
only:
157+
only:
153158
- tags
154159
needs:
155160
- release_binary_windows
156161
before_script:
157-
- python3 -V # Print out python version for debugging
162+
- python3 -V # Print out python version for debugging
158163
- apt update
159164
- apt install -y unzip libusb-1.0-0-dev libudev-dev # usb-support in hidapi
160165
- pip3 install virtualenv
161166
# Only difference to default befor_script: (ToDo fix this)
162167
- python3 -m virtualenv --python=python3 .env
163168
- source .env/bin/activate
164-
- pip3 install -e ".[test]"
169+
# https://github.com/python-babel/babel/issues/990#issuecomment-1760326334
170+
- rm -f /etc/localtime
171+
- ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime
172+
- pip3 install -e ".[test]" # TZ=UTC because https://github.com/nektos/act/issues/1853
165173
script:
166174
- echo "Releasing for ${CI_PROJECT_ROOT_NAMESPACE}"
167175
- export CI_PROJECT_ROOT_NAMESPACE # needed in the build-script to download the right windows-binary
@@ -176,17 +184,17 @@ release_electron_linux_windows:
176184
- ./utils/artifact_signer.sh sign --artifact ./release/SHA256SUMS-win
177185
- ./utils/artifact_signer.sh sign --artifact ./release/SHA256SUMS-linux
178186
- python3 ./utils/github.py upload ./release/Specter-Setup-${CI_COMMIT_TAG}.exe
179-
- python3 ./utils/github.py upload ./release/specterd-${CI_COMMIT_TAG}-x86_64-linux-gnu.zip
180-
- python3 ./utils/github.py upload ./release/specter_desktop-${CI_COMMIT_TAG}-x86_64-linux-gnu.tar.gz
187+
- python3 ./utils/github.py upload ./release/specterd-${CI_COMMIT_TAG}-x86_64-linux-gnu.zip
188+
- python3 ./utils/github.py upload ./release/specter_desktop-${CI_COMMIT_TAG}-x86_64-linux-gnu.tar.gz
181189
#- python3 ../utils/github.py upload ./release/SHA256SUMS-linux
182190
#- python3 ../utils/github.py upload ./release/SHA256SUMS-linux.asc
183191
#- python3 ../utils/github.py upload ./release/SHA256SUMS-win
184192
#- python3 ../utils/github.py upload ./release/SHA256SUMS-win.asc
185193
cache:
186194
key:
187-
files:
188-
- ./pyinstaller/electron/package-lock.json
189-
prefix: $CI_JOB_NAME
195+
files:
196+
- ./pyinstaller/electron/package-lock.json
197+
prefix: $CI_JOB_NAME
190198
paths:
191199
- ./pyinstaller/electron/node_modules
192200

@@ -204,28 +212,28 @@ release_electron_linux_windows:
204212

205213
release_signatures:
206214
stage: post_releasing
207-
only:
215+
only:
208216
- tags
209217
before_script:
210-
- python -V # Print out python version for debugging
218+
- python -V # Print out python version for debugging
211219
- pip3 install --upgrade virtualenv
212220
- virtualenv --python=python3 .env
213221
- source .env/bin/activate
214222
- pip3 install -e ".[test]"
215223
- ./utils/artifact_signer.sh init # prepare .gnupg
216224
script:
217-
- python3 -m utils.release-helper download # downloads the job-artifacts from gitlab
218-
- python3 -m utils.release-helper downloadgithub # downloads additional artifacts from github (if not there and is they have SHA256SUMS-something)
219-
- python3 -m utils.release-helper checksigs # checks the signatures of all SHA256SUMM*.asc files
220-
- python3 -m utils.release-helper checkhashes # checks all SHA256SUM* files (might modify files on the fly due to windows line endings)
221-
- python3 -m utils.release-helper create # creates a SHA256SUM
225+
- python3 -m utils.release_helper download # downloads the job-artifacts from gitlab
226+
- python3 -m utils.release_helper downloadgithub # downloads additional artifacts from github (if not there and is they have SHA256SUMS-something)
227+
- python3 -m utils.release_helper checksigs # checks the signatures of all SHA256SUMM*.asc files
228+
- python3 -m utils.release_helper checkhashes # checks all SHA256SUM* files (might modify files on the fly due to windows line endings)
229+
- python3 -m utils.release_helper create # creates a SHA256SUM
222230
- ./utils/artifact_signer.sh sign --artifact ./signing_dir/SHA256SUMS # Signs the SHA256SUM
223-
- python3 -m utils.release-helper upload_shasums # uploads SHA256SUMS to github
224-
- python3 -m utils.release-helper upload_shasumssig # uploads SHA256SUMS.asc to github
231+
- python3 -m utils.release_helper upload_shasums # uploads SHA256SUMS to github
232+
- python3 -m utils.release_helper upload_shasumssig # uploads SHA256SUMS.asc to github
225233

226234
release_docker:
227235
stage: post_releasing
228-
only:
236+
only:
229237
- tags
230238
before_script:
231239
- echo "Triggering Docker Release"
@@ -239,46 +247,35 @@ tag_specterext_dummy_repo:
239247
only:
240248
- tags
241249
before_script:
242-
## Install ssh-agent if not already installed, it is required by Docker.
243-
## (change apt-get to yum if you use an RPM-based image)
244-
##
245-
- 'which ssh-agent || ( apk update && apk add --no-cache bash git openssh )'
246-
- docker info
247-
248-
##
249-
## Run ssh-agent (inside the build environment)
250-
##
251-
- eval $(ssh-agent -s)
252-
253-
##
254-
## Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
255-
## We're using tr to fix line endings which makes ed25519 keys work
256-
## without extra base64 encoding.
257-
## https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
258-
##
259-
- echo "$SSH_SPECTEREXT_DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null
260-
261-
##
262-
## Create the SSH directory and give it the right permissions
263-
##
264-
- mkdir -p ~/.ssh
265-
- chmod 700 ~/.ssh
266-
267-
##
268-
## Optionally, if you will be using any Git commands, set the user name and
269-
## and email.
270-
##
271-
- git config --global user.email "specter@secretvalues"
272-
- git config --global user.name "specter"
273-
274-
##
275-
## Assuming you created the SSH_KNOWN_HOSTS variable, uncomment the
276-
## following two lines.
277-
##
278-
- echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
279-
- chmod 644 ~/.ssh/known_hosts
280-
250+
# write access to git@github.com:cryptoadvance/specterext-dummy.git
251+
- source ./utils/prepare_for_git_write.sh "$SSH_SPECTEREXT_DEPLOY_KEY"
281252
script:
282253
- echo "Now tagging ... git@github.com:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git"
283254
- ./utils/tag_specterext_dummy.sh
284255

256+
update_github:
257+
stage: post_releasing
258+
only:
259+
- tags
260+
needs:
261+
- release_signatures
262+
before_script:
263+
# write access to git@github.com:swan-bitcoin/specter-static.git
264+
- source ./utils/prepare_for_git_write.sh "$SSH_SPECTERSTATIC_DEPLOY_KEY"
265+
script:
266+
- echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specter-desktop/releases/tag/${CI_COMMIT_TAG:-v2.0.4-pre8}"
267+
- ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v2.0.4-pre8} generate github # default-value for testing
268+
269+
update_webpage:
270+
stage: post_releasing
271+
only:
272+
- tags
273+
needs:
274+
- release_signatures
275+
before_script:
276+
# write access to git@github.com:swan-bitcoin/specter-static.git
277+
- source ./utils/prepare_for_git_write.sh "$SSH_SPECTERSTATIC_DEPLOY_KEY"
278+
script:
279+
- echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specter-static.git"
280+
- ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v2.0.4-pre8} generate webpage # default-value for testing
281+

.vscode/settings.json

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
22
"python.testing.unittestEnabled": false,
3-
"python.testing.pytestEnabled": true
3+
"python.testing.pytestEnabled": true,
4+
"editor.formatOnSave": true,
5+
"editor.defaultFormatter": "esbenp.prettier-vscode",
6+
"[javascript]": {
7+
"editor.defaultFormatter": "esbenp.prettier-vscode"
8+
},
49
}

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ As a small team on a tiny budget we are working hard to make Specter better ever
7777

7878
### Using the Specter Desktop app
7979
The easiest way to run Specter Desktop is by installing the Specter Desktop app, which you can find on the [GitHub release page](https://github.com/cryptoadvance/specter-desktop/releases).
80-
With this method, all you need to do is just download the right file for your operating system and install it like a normal desktop app (Debian buster is only [partially supported](https://github.com/cryptoadvance/specter-desktop/issues/769))
80+
With this method, all you need to do is just download the right file for your operating system and install it like a normal desktop app (Debian buster is only [partially supported](https://github.com/cryptoadvance/specter-desktop/issues/769)).
81+
But there are a bunch of other option which you can read up in the [installation guide](docs/install_guide.md).
8182

8283
### Installing Specter from Pip
8384
* Specter requires Python version 3.9 to 3.10.

0 commit comments

Comments
 (0)