From e1216ac45d16081833ffc30ab3bfced485c72487 Mon Sep 17 00:00:00 2001 From: David de Kloet <122978264+dskloetd@users.noreply.github.com> Date: Fri, 29 Sep 2023 17:55:21 +0200 Subject: [PATCH] Add color to release-sop (#3419) # Motivation It can be used to find specific values such as the commit hash or the RC URL in the output of the release SOP script. # Changes 1. Output newly recorded values in green. 2. Output previously recorded values in magenta. 3. Update tests. # Tests updated # Todos - [ ] Add entry to changelog (if necessary). not necessary --- scripts/nns-dapp/release-sop | 8 ++- ...lease-sop-test-continue-after-success.json | 26 ++++---- ...se-sop-test-continue-different-commit.json | 10 ++-- ...t-continue-different-staging-canister.json | 22 +++---- ...elease-sop-test-different-cargo-audit.json | 30 +++++----- .../release-sop-test-different-npm-audit.json | 26 ++++---- ...-sop-test-different-staging-wasm-hash.json | 56 ++++++++--------- .../release-sop-test-different-wasm-hash.json | 38 ++++++------ .../release-sop-test-html-in-template.json | 32 +++++----- .../nns-dapp/release-sop-test-old-script.json | 4 +- .../release-sop-test-successful-release.json | 60 +++++++++---------- 11 files changed, 158 insertions(+), 154 deletions(-) diff --git a/scripts/nns-dapp/release-sop b/scripts/nns-dapp/release-sop index 7d936445438..bca30c5ebc4 100755 --- a/scripts/nns-dapp/release-sop +++ b/scripts/nns-dapp/release-sop @@ -127,6 +127,10 @@ fi TOP_DIR=$(execute git rev-parse --show-toplevel) execute cd "$TOP_DIR" +GREEN_COLOR="\033[32m" +MAGENTA_COLOR="\033[35m" +RESET_COLOR="\033[0m" + checklist_get() { local name name="$1" @@ -150,7 +154,7 @@ checklist_add() { temp_file="$CHECKLIST_FILE.tmp" jq --arg name "$name" --arg value "$value" '. + [{name: $name, value: $value}]' "$CHECKLIST_FILE" >"$temp_file" mv "$temp_file" "$CHECKLIST_FILE" - echo "$name: $value" + echo -e "$name: ${GREEN_COLOR}$value${RESET_COLOR}" } # This script is designed to be run multiple times. Steps that have been @@ -202,7 +206,7 @@ record() { shift value="$(checklist_get "$label")" if [ "$value" ]; then - echo "$label: Was already: $value" + echo -e "$label: Was already: ${MAGENTA_COLOR}$value${RESET_COLOR}" return fi if ! value="$(execute "$@")"; then diff --git a/scripts/nns-dapp/release-sop-test-continue-after-success.json b/scripts/nns-dapp/release-sop-test-continue-after-success.json index bd1c601fe7c..94b5ceec3e0 100644 --- a/scripts/nns-dapp/release-sop-test-continue-after-success.json +++ b/scripts/nns-dapp/release-sop-test-continue-after-success.json @@ -54,36 +54,36 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: Was already: 2001-02-29 14:15:16", + "Start time: Was already: \u001b[35m2001-02-29 14:15:16\u001b[0m", "git fetch --tags --force: Was already done. Skipping.", - "Release SOP script is newest version: Was already: yes", + "Release SOP script is newest version: Was already: \u001b[35myes\u001b[0m", "git checkout -b Release-2001-02-29 --no-track origin/main: Was already done. Skipping.", - "Release branch: Was already: Release-2001-02-29", + "Release branch: Was already: \u001b[35mRelease-2001-02-29\u001b[0m", "Current branch: Release-2001-02-29", "git push origin Release-2001-02-29: Was already done. Skipping.", - "Release branch URL: Was already: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "Release branch URL: Was already: \u001b[35mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "git tag -f release-candidate: Was already done. Skipping.", - "Release commit: Was already: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "Release commit: Was already: \u001b[35ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", "git push origin -f tags/release-candidate: Was already done. Skipping.", - "Security test: npm audit: Was already: found 0 vulnerabilities", + "Security test: npm audit: Was already: \u001b[35mfound 0 vulnerabilities\u001b[0m", "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: Was already: RUSTSEC-2020-0071,RUSTSEC-2020-0159", + "Security test: cargo audit: Was already: \u001b[35mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Security test: no HTML in templates: Was already: Checked", + "Security test: no HTML in templates: Was already: \u001b[35mChecked\u001b[0m", "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: Was already done. Skipping.", - "CI NNS-dapp WASM hash: Was already: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", + "CI NNS-dapp WASM hash: Was already: \u001b[35m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", "Local WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", "scripts/canister_ids --remove --network staging --canister nns-dapp: Was already done. Skipping.", - "dfx identity: Was already: default: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe", + "dfx identity: Was already: \u001b[35mdefault: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe\u001b[0m", "dfx canister create nns-dapp --network staging --no-wallet: Was already done. Skipping.", - "NNS-dapp staging canister ID: Was already: jefp3-bqaaa-aaaaa-aacyq-cai", + "NNS-dapp staging canister ID: Was already: \u001b[35mjefp3-bqaaa-aaaaa-aacyq-cai\u001b[0m", "Current NNS-dapp staging canister ID: jefp3-bqaaa-aaaaa-aacyq-cai", "DFX_NETWORK=staging ./config.sh: Was already done. Skipping.", "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz: Was already done. Skipping.", - "Staging URL: Was already: https://jefp3-bqaaa-aaaaa-aacyq-cai.nnsdapp.dfinity.network/", + "Staging URL: Was already: \u001b[35mhttps://jefp3-bqaaa-aaaaa-aacyq-cai.nnsdapp.dfinity.network/\u001b[0m", "Staging WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", - "Post on Slack: Was already: https://dfinity.slack.com/archives/C03HZERHBT3/p1687962898467509" + "Post on Slack: Was already: \u001b[35mhttps://dfinity.slack.com/archives/C03HZERHBT3/p1687962898467509\u001b[0m" ], "expectedExitCode": 0 } diff --git a/scripts/nns-dapp/release-sop-test-continue-different-commit.json b/scripts/nns-dapp/release-sop-test-continue-different-commit.json index c5afe2fd2a0..9dafdf9a2e3 100644 --- a/scripts/nns-dapp/release-sop-test-continue-different-commit.json +++ b/scripts/nns-dapp/release-sop-test-continue-different-commit.json @@ -30,16 +30,16 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: Was already: 2001-02-29 14:15:16", + "Start time: Was already: \u001b[35m2001-02-29 14:15:16\u001b[0m", "git fetch --tags --force: Was already done. Skipping.", - "Release SOP script is newest version: Was already: yes", + "Release SOP script is newest version: Was already: \u001b[35myes\u001b[0m", "git checkout -b Release-2001-02-29 --no-track origin/main: Was already done. Skipping.", - "Release branch: Was already: Release-2001-02-29", + "Release branch: Was already: \u001b[35mRelease-2001-02-29\u001b[0m", "Current branch: Release-2001-02-29", "git push origin Release-2001-02-29: Was already done. Skipping.", - "Release branch URL: Was already: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "Release branch URL: Was already: \u001b[35mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "git tag -f release-candidate: Was already done. Skipping.", - "Release commit: Was already: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "Release commit: Was already: \u001b[35ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "Values don't match!", "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", "tags/release-candidate commit: ffffffffffffffffffffffffffffffffffffffffff" diff --git a/scripts/nns-dapp/release-sop-test-continue-different-staging-canister.json b/scripts/nns-dapp/release-sop-test-continue-different-staging-canister.json index fcbc95aeb79..49eab21f16a 100644 --- a/scripts/nns-dapp/release-sop-test-continue-different-staging-canister.json +++ b/scripts/nns-dapp/release-sop-test-continue-different-staging-canister.json @@ -42,30 +42,30 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: Was already: 2001-02-29 14:15:16", + "Start time: Was already: \u001b[35m2001-02-29 14:15:16\u001b[0m", "git fetch --tags --force: Was already done. Skipping.", - "Release SOP script is newest version: Was already: yes", + "Release SOP script is newest version: Was already: \u001b[35myes\u001b[0m", "git checkout -b Release-2001-02-29 --no-track origin/main: Was already done. Skipping.", - "Release branch: Was already: Release-2001-02-29", + "Release branch: Was already: \u001b[35mRelease-2001-02-29\u001b[0m", "Current branch: Release-2001-02-29", "git push origin Release-2001-02-29: Was already done. Skipping.", - "Release branch URL: Was already: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "Release branch URL: Was already: \u001b[35mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "git tag -f release-candidate: Was already done. Skipping.", - "Release commit: Was already: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "Release commit: Was already: \u001b[35ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", "git push origin -f tags/release-candidate: Was already done. Skipping.", - "Security test: npm audit: Was already: found 0 vulnerabilities", + "Security test: npm audit: Was already: \u001b[35mfound 0 vulnerabilities\u001b[0m", "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: Was already: RUSTSEC-2020-0071,RUSTSEC-2020-0159", + "Security test: cargo audit: Was already: \u001b[35mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Security test: no HTML in templates: Was already: Checked", + "Security test: no HTML in templates: Was already: \u001b[35mChecked\u001b[0m", "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: Was already done. Skipping.", - "CI NNS-dapp WASM hash: Was already: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", + "CI NNS-dapp WASM hash: Was already: \u001b[35m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", "Local WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", "scripts/canister_ids --remove --network staging --canister nns-dapp: Was already done. Skipping.", - "dfx identity: Was already: default: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe", + "dfx identity: Was already: \u001b[35mdefault: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe\u001b[0m", "dfx canister create nns-dapp --network staging --no-wallet: Was already done. Skipping.", - "NNS-dapp staging canister ID: Was already: jefp3-bqaaa-aaaaa-aacyq-cai", + "NNS-dapp staging canister ID: Was already: \u001b[35mjefp3-bqaaa-aaaaa-aacyq-cai\u001b[0m", "Values don't match!", "NNS-dapp staging canister ID: jefp3-bqaaa-aaaaa-aacyq-cai", "Current NNS-dapp staging canister ID: aaaaa-aa" diff --git a/scripts/nns-dapp/release-sop-test-different-cargo-audit.json b/scripts/nns-dapp/release-sop-test-different-cargo-audit.json index c42917495de..34ccdd8fdaa 100644 --- a/scripts/nns-dapp/release-sop-test-different-cargo-audit.json +++ b/scripts/nns-dapp/release-sop-test-different-cargo-audit.json @@ -66,41 +66,41 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", - "Release SOP script is newest version: yes", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", + "Release SOP script is newest version: \u001b[32myes\u001b[0m", "👇 Press enter to run the following command:", "", "git checkout -b Release-2001-02-29 --no-track origin/main", "", - "git checkout -b Release-2001-02-29 --no-track origin/main: Done", - "Release branch: Release-2001-02-29", - "Current branch: Release-2001-02-29", + "git checkout -b Release-2001-02-29 --no-track origin/main: \u001b[32mDone\u001b[0m", + "Release branch: \u001b[32mRelease-2001-02-29\u001b[0m", + "Current branch: \u001b[32mRelease-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin Release-2001-02-29", "", - "git push origin Release-2001-02-29: Done", - "Release branch URL: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "git push origin Release-2001-02-29: \u001b[32mDone\u001b[0m", + "Release branch URL: \u001b[32mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git tag -f release-candidate", "", - "git tag -f release-candidate: Done", - "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", - "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "git tag -f release-candidate: \u001b[32mDone\u001b[0m", + "Release commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", + "tags/release-candidate commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin -f tags/release-candidate", "", - "git push origin -f tags/release-candidate: Done", - "Security test: npm audit: found 0 vulnerabilities", - "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: RUSTSEC-1999-0001", + "git push origin -f tags/release-candidate: \u001b[32mDone\u001b[0m", + "Security test: npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Expected npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Security test: cargo audit: \u001b[32mRUSTSEC-1999-0001\u001b[0m", "Values don't match!", "Security test: cargo audit: RUSTSEC-1999-0001", "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159" diff --git a/scripts/nns-dapp/release-sop-test-different-npm-audit.json b/scripts/nns-dapp/release-sop-test-different-npm-audit.json index b07fe828d8a..e20b3c92f77 100644 --- a/scripts/nns-dapp/release-sop-test-different-npm-audit.json +++ b/scripts/nns-dapp/release-sop-test-different-npm-audit.json @@ -60,39 +60,39 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", - "Release SOP script is newest version: yes", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", + "Release SOP script is newest version: \u001b[32myes\u001b[0m", "👇 Press enter to run the following command:", "", "git checkout -b Release-2001-02-29 --no-track origin/main", "", - "git checkout -b Release-2001-02-29 --no-track origin/main: Done", - "Release branch: Release-2001-02-29", - "Current branch: Release-2001-02-29", + "git checkout -b Release-2001-02-29 --no-track origin/main: \u001b[32mDone\u001b[0m", + "Release branch: \u001b[32mRelease-2001-02-29\u001b[0m", + "Current branch: \u001b[32mRelease-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin Release-2001-02-29", "", - "git push origin Release-2001-02-29: Done", - "Release branch URL: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "git push origin Release-2001-02-29: \u001b[32mDone\u001b[0m", + "Release branch URL: \u001b[32mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git tag -f release-candidate", "", - "git tag -f release-candidate: Done", - "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", - "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "git tag -f release-candidate: \u001b[32mDone\u001b[0m", + "Release commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", + "tags/release-candidate commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin -f tags/release-candidate", "", - "git push origin -f tags/release-candidate: Done", - "Security test: npm audit: https://github.com/advisories/XXXX-xxxx-xxxx-xxxx", + "git push origin -f tags/release-candidate: \u001b[32mDone\u001b[0m", + "Security test: npm audit: \u001b[32mhttps://github.com/advisories/XXXX-xxxx-xxxx-xxxx\u001b[0m", "Values don't match!", "Security test: npm audit: https://github.com/advisories/XXXX-xxxx-xxxx-xxxx", "Expected npm audit: found 0 vulnerabilities" diff --git a/scripts/nns-dapp/release-sop-test-different-staging-wasm-hash.json b/scripts/nns-dapp/release-sop-test-different-staging-wasm-hash.json index 977e83c77e2..ba8205901fa 100644 --- a/scripts/nns-dapp/release-sop-test-different-staging-wasm-hash.json +++ b/scripts/nns-dapp/release-sop-test-different-staging-wasm-hash.json @@ -108,74 +108,74 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", - "Release SOP script is newest version: yes", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", + "Release SOP script is newest version: \u001b[32myes\u001b[0m", "👇 Press enter to run the following command:", "", "git checkout -b Release-2001-02-29 --no-track origin/main", "", - "git checkout -b Release-2001-02-29 --no-track origin/main: Done", - "Release branch: Release-2001-02-29", - "Current branch: Release-2001-02-29", + "git checkout -b Release-2001-02-29 --no-track origin/main: \u001b[32mDone\u001b[0m", + "Release branch: \u001b[32mRelease-2001-02-29\u001b[0m", + "Current branch: \u001b[32mRelease-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin Release-2001-02-29", "", - "git push origin Release-2001-02-29: Done", - "Release branch URL: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "git push origin Release-2001-02-29: \u001b[32mDone\u001b[0m", + "Release branch URL: \u001b[32mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git tag -f release-candidate", "", - "git tag -f release-candidate: Done", - "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", - "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "git tag -f release-candidate: \u001b[32mDone\u001b[0m", + "Release commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", + "tags/release-candidate commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin -f tags/release-candidate", "", - "git push origin -f tags/release-candidate: Done", - "Security test: npm audit: found 0 vulnerabilities", - "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Security test: no HTML in templates: Checked", + "git push origin -f tags/release-candidate: \u001b[32mDone\u001b[0m", + "Security test: npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Expected npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Security test: cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Expected cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Security test: no HTML in templates: \u001b[32mChecked\u001b[0m", "👇 Press enter to run the following command:", "", "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz", "", - "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: Done", - "CI NNS-dapp WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", - "Local WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", + "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: \u001b[32mDone\u001b[0m", + "CI NNS-dapp WASM hash: \u001b[32m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", + "Local WASM hash: \u001b[32m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", "👇 Press enter to run the following command:", "", "scripts/canister_ids --remove --network staging --canister nns-dapp", "", - "scripts/canister_ids --remove --network staging --canister nns-dapp: Done", - "dfx identity: default: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe", + "scripts/canister_ids --remove --network staging --canister nns-dapp: \u001b[32mDone\u001b[0m", + "dfx identity: \u001b[32mdefault: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe\u001b[0m", "👇 Press enter to run the following command:", "", "dfx canister create nns-dapp --network staging --no-wallet", "", - "dfx canister create nns-dapp --network staging --no-wallet: Done", - "NNS-dapp staging canister ID: jefp3-bqaaa-aaaaa-aacyq-cai", - "Current NNS-dapp staging canister ID: jefp3-bqaaa-aaaaa-aacyq-cai", + "dfx canister create nns-dapp --network staging --no-wallet: \u001b[32mDone\u001b[0m", + "NNS-dapp staging canister ID: \u001b[32mjefp3-bqaaa-aaaaa-aacyq-cai\u001b[0m", + "Current NNS-dapp staging canister ID: \u001b[32mjefp3-bqaaa-aaaaa-aacyq-cai\u001b[0m", "👇 Press enter to run the following command:", "", "DFX_NETWORK=staging ./config.sh", "", - "DFX_NETWORK=staging ./config.sh: Done", + "DFX_NETWORK=staging ./config.sh: \u001b[32mDone\u001b[0m", "👇 Press enter to run the following command:", "", "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz", "", - "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz: Done", - "Staging URL: https://jefp3-bqaaa-aaaaa-aacyq-cai.nnsdapp.dfinity.network/", + "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz: \u001b[32mDone\u001b[0m", + "Staging URL: \u001b[32mhttps://jefp3-bqaaa-aaaaa-aacyq-cai.nnsdapp.dfinity.network/\u001b[0m", "Values don't match!", "CI NNS-dapp WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", "Staging WASM hash: 8888888888888888888888888888888888888888888888888888888888888888" diff --git a/scripts/nns-dapp/release-sop-test-different-wasm-hash.json b/scripts/nns-dapp/release-sop-test-different-wasm-hash.json index 17f11d5bc96..37cf0b3ccef 100644 --- a/scripts/nns-dapp/release-sop-test-different-wasm-hash.json +++ b/scripts/nns-dapp/release-sop-test-different-wasm-hash.json @@ -84,49 +84,49 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", - "Release SOP script is newest version: yes", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", + "Release SOP script is newest version: \u001b[32myes\u001b[0m", "👇 Press enter to run the following command:", "", "git checkout -b Release-2001-02-29 --no-track origin/main", "", - "git checkout -b Release-2001-02-29 --no-track origin/main: Done", - "Release branch: Release-2001-02-29", - "Current branch: Release-2001-02-29", + "git checkout -b Release-2001-02-29 --no-track origin/main: \u001b[32mDone\u001b[0m", + "Release branch: \u001b[32mRelease-2001-02-29\u001b[0m", + "Current branch: \u001b[32mRelease-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin Release-2001-02-29", "", - "git push origin Release-2001-02-29: Done", - "Release branch URL: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "git push origin Release-2001-02-29: \u001b[32mDone\u001b[0m", + "Release branch URL: \u001b[32mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git tag -f release-candidate", "", - "git tag -f release-candidate: Done", - "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", - "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "git tag -f release-candidate: \u001b[32mDone\u001b[0m", + "Release commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", + "tags/release-candidate commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin -f tags/release-candidate", "", - "git push origin -f tags/release-candidate: Done", - "Security test: npm audit: found 0 vulnerabilities", - "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Security test: no HTML in templates: Checked", + "git push origin -f tags/release-candidate: \u001b[32mDone\u001b[0m", + "Security test: npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Expected npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Security test: cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Expected cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Security test: no HTML in templates: \u001b[32mChecked\u001b[0m", "👇 Press enter to run the following command:", "", "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz", "", - "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: Done", - "CI NNS-dapp WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", + "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: \u001b[32mDone\u001b[0m", + "CI NNS-dapp WASM hash: \u001b[32m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", "Values don't match!", "CI NNS-dapp WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", "Local WASM hash: 1111111111111111111111111111111111111111111111111111111111111111" diff --git a/scripts/nns-dapp/release-sop-test-html-in-template.json b/scripts/nns-dapp/release-sop-test-html-in-template.json index 9b97edcfd49..e33e8fcf5ec 100644 --- a/scripts/nns-dapp/release-sop-test-html-in-template.json +++ b/scripts/nns-dapp/release-sop-test-html-in-template.json @@ -72,42 +72,42 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", - "Release SOP script is newest version: yes", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", + "Release SOP script is newest version: \u001b[32myes\u001b[0m", "👇 Press enter to run the following command:", "", "git checkout -b Release-2001-02-29 --no-track origin/main", "", - "git checkout -b Release-2001-02-29 --no-track origin/main: Done", - "Release branch: Release-2001-02-29", - "Current branch: Release-2001-02-29", + "git checkout -b Release-2001-02-29 --no-track origin/main: \u001b[32mDone\u001b[0m", + "Release branch: \u001b[32mRelease-2001-02-29\u001b[0m", + "Current branch: \u001b[32mRelease-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin Release-2001-02-29", "", - "git push origin Release-2001-02-29: Done", - "Release branch URL: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "git push origin Release-2001-02-29: \u001b[32mDone\u001b[0m", + "Release branch URL: \u001b[32mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git tag -f release-candidate", "", - "git tag -f release-candidate: Done", - "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", - "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "git tag -f release-candidate: \u001b[32mDone\u001b[0m", + "Release commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", + "tags/release-candidate commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin -f tags/release-candidate", "", - "git push origin -f tags/release-candidate: Done", - "Security test: npm audit: found 0 vulnerabilities", - "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", + "git push origin -f tags/release-candidate: \u001b[32mDone\u001b[0m", + "Security test: npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Expected npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Security test: cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Expected cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", "Security test: no HTML in templates: Failed" ], "expectedExitCode": 1 diff --git a/scripts/nns-dapp/release-sop-test-old-script.json b/scripts/nns-dapp/release-sop-test-old-script.json index b485b3cb48b..3c079be9057 100644 --- a/scripts/nns-dapp/release-sop-test-old-script.json +++ b/scripts/nns-dapp/release-sop-test-old-script.json @@ -48,12 +48,12 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", "Release SOP script is newest version: Failed" ], "expectedExitCode": 1 diff --git a/scripts/nns-dapp/release-sop-test-successful-release.json b/scripts/nns-dapp/release-sop-test-successful-release.json index b313c3588a4..bfe83df4f84 100644 --- a/scripts/nns-dapp/release-sop-test-successful-release.json +++ b/scripts/nns-dapp/release-sop-test-successful-release.json @@ -114,76 +114,76 @@ ], "expectedOutput": [ "Checklist file: scripts/nns-dapp/Release-2001-02-29.json", - "Start time: 2001-02-29 14:15:16", + "Start time: \u001b[32m2001-02-29 14:15:16\u001b[0m", "👇 Press enter to run the following command:", "", "git fetch --tags --force", "", - "git fetch --tags --force: Done", - "Release SOP script is newest version: yes", + "git fetch --tags --force: \u001b[32mDone\u001b[0m", + "Release SOP script is newest version: \u001b[32myes\u001b[0m", "👇 Press enter to run the following command:", "", "git checkout -b Release-2001-02-29 --no-track origin/main", "", - "git checkout -b Release-2001-02-29 --no-track origin/main: Done", - "Release branch: Release-2001-02-29", - "Current branch: Release-2001-02-29", + "git checkout -b Release-2001-02-29 --no-track origin/main: \u001b[32mDone\u001b[0m", + "Release branch: \u001b[32mRelease-2001-02-29\u001b[0m", + "Current branch: \u001b[32mRelease-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin Release-2001-02-29", "", - "git push origin Release-2001-02-29: Done", - "Release branch URL: https://github.com/dfinity/nns-dapp/tree/Release-2001-02-29", + "git push origin Release-2001-02-29: \u001b[32mDone\u001b[0m", + "Release branch URL: \u001b[32mhttps://github.com/dfinity/nns-dapp/tree/Release-2001-02-29\u001b[0m", "👇 Press enter to run the following command:", "", "git tag -f release-candidate", "", - "git tag -f release-candidate: Done", - "Release commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", - "tags/release-candidate commit: a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3", + "git tag -f release-candidate: \u001b[32mDone\u001b[0m", + "Release commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", + "tags/release-candidate commit: \u001b[32ma1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\u001b[0m", "👇 Press enter to run the following command:", "", "git push origin -f tags/release-candidate", "", - "git push origin -f tags/release-candidate: Done", - "Security test: npm audit: found 0 vulnerabilities", - "Expected npm audit: found 0 vulnerabilities", - "Security test: cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Expected cargo audit: RUSTSEC-2020-0071,RUSTSEC-2020-0159", - "Security test: no HTML in templates: Checked", + "git push origin -f tags/release-candidate: \u001b[32mDone\u001b[0m", + "Security test: npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Expected npm audit: \u001b[32mfound 0 vulnerabilities\u001b[0m", + "Security test: cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Expected cargo audit: \u001b[32mRUSTSEC-2020-0071,RUSTSEC-2020-0159\u001b[0m", + "Security test: no HTML in templates: \u001b[32mChecked\u001b[0m", "👇 Press enter to run the following command:", "", "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz", "", - "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: Done", - "CI NNS-dapp WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", - "Local WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", + "scripts/nns-dapp/download-ci-wasm --commit tags/release-candidate --dir /home/runner/work/nns-dapp/release/ci --wasm-filename nns-dapp.wasm.gz: \u001b[32mDone\u001b[0m", + "CI NNS-dapp WASM hash: \u001b[32m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", + "Local WASM hash: \u001b[32m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", "👇 Press enter to run the following command:", "", "scripts/canister_ids --remove --network staging --canister nns-dapp", "", - "scripts/canister_ids --remove --network staging --canister nns-dapp: Done", - "dfx identity: default: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe", + "scripts/canister_ids --remove --network staging --canister nns-dapp: \u001b[32mDone\u001b[0m", + "dfx identity: \u001b[32mdefault: s2dw5-fmktb-knrnq-772tr-ca3g7-me224-st35j-f3eli-xx2vf-aoesd-2qe\u001b[0m", "👇 Press enter to run the following command:", "", "dfx canister create nns-dapp --network staging --no-wallet", "", - "dfx canister create nns-dapp --network staging --no-wallet: Done", - "NNS-dapp staging canister ID: jefp3-bqaaa-aaaaa-aacyq-cai", - "Current NNS-dapp staging canister ID: jefp3-bqaaa-aaaaa-aacyq-cai", + "dfx canister create nns-dapp --network staging --no-wallet: \u001b[32mDone\u001b[0m", + "NNS-dapp staging canister ID: \u001b[32mjefp3-bqaaa-aaaaa-aacyq-cai\u001b[0m", + "Current NNS-dapp staging canister ID: \u001b[32mjefp3-bqaaa-aaaaa-aacyq-cai\u001b[0m", "👇 Press enter to run the following command:", "", "DFX_NETWORK=staging ./config.sh", "", - "DFX_NETWORK=staging ./config.sh: Done", + "DFX_NETWORK=staging ./config.sh: \u001b[32mDone\u001b[0m", "👇 Press enter to run the following command:", "", "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz", "", - "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz: Done", - "Staging URL: https://jefp3-bqaaa-aaaaa-aacyq-cai.nnsdapp.dfinity.network/", - "Staging WASM hash: 6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4", - "Post on Slack: https://dfinity.slack.com/archives/C03HZERHBT3/p1687962898467509" + "dfx canister install nns-dapp --argument \\(record\\{\\}\\) --network staging --wasm ./release/ci/nns-dapp.wasm.gz: \u001b[32mDone\u001b[0m", + "Staging URL: \u001b[32mhttps://jefp3-bqaaa-aaaaa-aacyq-cai.nnsdapp.dfinity.network/\u001b[0m", + "Staging WASM hash: \u001b[32m6fbaddd1b8fde76de97ca1b03a356f01741878d6210cd9b7c6753ae80ae374a4\u001b[0m", + "Post on Slack: \u001b[32mhttps://dfinity.slack.com/archives/C03HZERHBT3/p1687962898467509\u001b[0m" ], "expectedExitCode": 0 }