Skip to content

Comments

fix: for release script calling dfx generate to incorrect dfx executable#2443

Merged
mergify[bot] merged 6 commits intomasterfrom
release-fix-dfx-generate
Aug 16, 2022
Merged

fix: for release script calling dfx generate to incorrect dfx executable#2443
mergify[bot] merged 6 commits intomasterfrom
release-fix-dfx-generate

Conversation

@ghost
Copy link

@ghost ghost commented Aug 12, 2022

Description

Since package.json now specifies to call dfx generate, we need to alter the release script so that this calls the release candidate dfx executable rather than some other one. To do this, the release script now prepends the target directory to the PATH, and calls dfx using that.

This avoids errors like this during the release process:

Creating canister hello_world_frontend...
hello_world_frontend canister created with canister id: ryjl3-tyaaa-aaaaa-aaaba-cai
Building canisters...
Building frontend...
WARN: Warning: The version of DFX used (0.9.1-303-g4e0b172d) is different than the version being run (0.11.0).
This might happen because your dfx.json specifies an older version, or DFX_VERSION is set in your environment.
We are forwarding the command line to the old version. To disable this warning, set the DFX_WARNING=-version_check environment variable.
    
Building canisters before generate for Motoko

Also updated the allowed regex for release names for more arbitrary strings than just alpha and beta.

How Has This Been Tested?

DRY_RUN=1 ./scripts/release.sh 0.12.0-ens.1

Eric Swanson added 2 commits August 12, 2022 14:18
This matches the step already documented in the release process notes.
Since package.json now specifies to call `dfx generate`, we need to alter the release script so that this calls the release candidate dfx executable rather than another one.  To do this, the release script now prepends the target directory to the PATH, and calls dfx using that.

This avoids errors like this during the release process:

Creating canister hello_world_frontend...
hello_world_frontend canister created with canister id: ryjl3-tyaaa-aaaaa-aaaba-cai
Building canisters...
Building frontend...
WARN: Warning: The version of DFX used (0.9.1-303-g4e0b172d) is different than the version being run (0.11.0).
This might happen because your dfx.json specifies an older version, or DFX_VERSION is set in your environment.
We are forwarding the command line to the old version. To disable this warning, set the DFX_WARNING=-version_check environment variable.

Building canisters before generate for Motoko
@ghost ghost self-requested a review as a code owner August 12, 2022 22:17
@ghost ghost added the automerge-squash label Aug 16, 2022
@mergify mergify bot merged commit fce257f into master Aug 16, 2022
@mergify mergify bot deleted the release-fix-dfx-generate branch August 16, 2022 17:31
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.

2 participants