Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(devops): Ask about clobbering #2770

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

bitdivine
Copy link
Member

@bitdivine bitdivine commented Oct 9, 2024

Motivation

When the signer wasm is updated, the existing code would not download the new signer.

Changes

  • If there is an existing signer candid or Wasm, ask the caller whether they would like to replace it.

Tests

When there are no existing files, they are downloaded:

max@sinkpad:~/dfn/oisy-wallet/branches/fix-deploy-frontend (15:34)$ rm target/signer.*
max@sinkpad:~/dfn/oisy-wallet/branches/fix-deploy-frontend (16:40)$ scripts/build.signer.sh
Downloading https://github.com/dfinity/chain-fusion-signer/releases/download/v0.2.3/signer.did --> target/signer.did
Downloading https://github.com/dfinity/chain-fusion-signer/releases/download/v0.2.3/signer.wasm.gz --> target/signer.wasm.gz

With existing files, No is the default. "n" "N" and "no" are recognized.

Overwrite existing target/signer.did? [y/N] n
Using existing signer candid file.

Overwrite existing target/signer.wasm.gz? [y/N] 
Using existing signer wasm file.

Overwrite existing target/signer.did? [y/N] N
Using existing signer candid file.

Overwrite existing target/signer.wasm.gz? [y/N] no
Using existing signer wasm file.

With existing files, "y" "Y" "yes" and "YES!!!" allows the files to be overwritten:

Overwrite existing target/signer.did? [y/N] y
Downloading https://github.com/dfinity/chain-fusion-signer/releases/download/v0.2.3/signer.did --> target/signer.did

Overwrite existing target/signer.wasm.gz? [y/N] Y
Downloading https://github.com/dfinity/chain-fusion-signer/releases/download/v0.2.3/signer.wasm.gz --> target/signer.wasm.gz

Overwrite existing target/signer.did? [y/N] yes
Downloading https://github.com/dfinity/chain-fusion-signer/releases/download/v0.2.3/signer.did --> target/signer.did

Overwrite existing target/signer.wasm.gz? [y/N] YES!!!
Downloading https://github.com/dfinity/chain-fusion-signer/releases/download/v0.2.3/signer.wasm.gz --> target/signer.wasm.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant