git.delta.rocks / unique-network / refs/commits / 307e69b41531

difftreelog

skip worflow if already upgraded

Max Andreev2023-06-12parent: #058c022.patch.diff
in: master
- fix manual migration script: use dirname
- update envs

3 files changed

modified.envdiffbeforeafterboth
--- a/.env
+++ b/.env
@@ -17,12 +17,12 @@
 KARURA_BUILD_BRANCH=release-karura-2.17.0
 MOONRIVER_BUILD_BRANCH=runtime-2302
 SHIDEN_BUILD_BRANCH=v5.4.0
-QUARTZ_MAINNET_BRANCH=release-v941055
+QUARTZ_MAINNET_BRANCH=release-v941056
 QUARTZ_REPLICA_FROM=wss://ws-quartz.unique.network:443
 
 UNIQUEWEST_MAINNET_BRANCH=release-v0.9.42
 WESTMINT_BUILD_BRANCH=parachains-v9420
-OPAL_MAINNET_BRANCH=release-v941055
+OPAL_MAINNET_BRANCH=release-v942057
 OPAL_REPLICA_FROM=wss://ws-opal.unique.network:443
 
 UNIQUEEAST_MAINNET_BRANCH=release-v0.9.42
modifiedtests/src/migrations/942057-appPromotion/lockedToFreeze.tsdiffbeforeafterboth
--- a/tests/src/migrations/942057-appPromotion/lockedToFreeze.ts
+++ b/tests/src/migrations/942057-appPromotion/lockedToFreeze.ts
@@ -1,8 +1,9 @@
 // import { usingApi, privateKey, onlySign } from "./../../load/lib";
 import * as fs from 'fs';
 import {usingPlaygrounds} from '../../util';
-import path from 'path';
+import path, {dirname} from 'path';
 import {isInteger, parse} from 'lossless-json';
+import {fileURLToPath} from 'url';
 
 
 const WS_ENDPOINT = 'ws://localhost:9944';
@@ -32,7 +33,8 @@
 
     // 3. Parse data to migrate
     console.log('3. Parsing chainql results...');
-    const parsingResult = parse(fs.readFileSync(path.resolve('src', 'migrations', '942057-appPromotion', 'output.json'), 'utf-8'), undefined, customNumberParser);
+    const dirName = dirname(fileURLToPath(import.meta.url));
+    const parsingResult = parse(fs.readFileSync(path.resolve(dirName, 'output.json'), 'utf-8'), undefined, customNumberParser);
 
     const chainqlImportData = parsingResult as {
       address: string;
modifiedtests/src/util/frankenstein.tsdiffbeforeafterboth
105 }105 }
106}106}
107
108async function skipIfAlreadyUpgraded() {
109 await usingPlaygrounds(async (helper) => {
110 const specVersion = await getSpecVersion(helper.getApi());
111 if(`v${specVersion}` === DESTINATION_SPEC_VERSION) {
112 console.log('\n🛸 Current version equal DESTINATION_SPEC_VERSION 🛸');
113 console.log("\n🛸 PARACHAINS' RUNTIME UPGRADE TESTING COMPLETE 🛸");
114 }
115 }, REPLICA_FROM);
116}
107117
108const raiseZombienet = async (): Promise<void> => {118const raiseZombienet = async (): Promise<void> => {
119 await skipIfAlreadyUpgraded();
109 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;120 const isUpgradeTesting = !!NEW_RELAY_BIN || !!NEW_RELAY_WASM || !!NEW_PARA_BIN || !!NEW_PARA_WASM;
110 /*121 /*
111 // If there is nothing to upgrade, what is the point122 // If there is nothing to upgrade, what is the point