From 37c6b26aaa4214fd61580c4f28af526f71674f54 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 28 Dec 2023 16:44:25 +0530 Subject: [PATCH] update live --- gulpfile.js | 33 +++++++++++++++++++++++++-------- package.json | 3 ++- release-process.md | 18 ++++++++++++++++++ 3 files changed, 45 insertions(+), 9 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index fa6d07089b..b0054fe45f 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -65,20 +65,37 @@ task('syncLibVersions', async function () { }); async function setBranchHead(branchName, head) { - console.log(await promisifyExec(`git checkout ${branchName}`)); - console.log(await promisifyExec(`git pull origin ${branchName}`)); - console.log(`pull done for ${branchName}`) - console.log(await promisifyExec(`git reset --hard ${head}`)); - await promisifyExec(`git push -f origin ${branchName}`); + try { + console.log(`Setting ${branchName} branch head to ${head}`) + let cmdOp = await promisifyExec(`git checkout ${branchName}`) + console.log(cmdOp.stdout) + cmdOp = await promisifyExec(`git pull origin ${branchName}`) + console.log(cmdOp.stdout) + cmdOp = await promisifyExec(`git reset --hard ${head}`) + console.log(cmdOp.stdout) + cmdOp = await promisifyExec(`git push -f origin ${branchName}`) + console.log(cmdOp.stdout) + }catch(error) { + console.error(error) + } } /* * @dev Task to set remix_beta branch up to date with master */ -task('updateBeta', async function () { +task('updateBetaToMaster', async function () { const masterBranchDetails = await axios.get('https://api.github.com/repos/ethereum/remix-project/branches/master') const masterBranchHead = masterBranchDetails.data.commit.sha - console.log(`Setting remix_beta to ${masterBranchHead} commit`) await setBranchHead('remix_beta', masterBranchHead) await Promise.resolve(); -}); \ No newline at end of file +}); + +/* +* @dev Task to set remix_live branch up to date with remix_beta +*/ +task('updateLiveToBeta', async function () { + const betaBranchDetails = await axios.get('https://api.github.com/repos/ethereum/remix-project/branches/remix_beta') + const betaBranchHead = betaBranchDetails.data.commit.sha + await setBranchHead('remix_live', betaBranchHead) + await Promise.resolve(); + }); \ No newline at end of file diff --git a/package.json b/package.json index b65515345d..fe343b8a5a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,8 @@ "babel": "babel", "watch:e2e": "nodemon", "bumpVersion:libs": "gulp & gulp syncLibVersions;", - "updateBeta": "gulp & gulp updateBeta;", + "updateBeta": "gulp & gulp updateBetaToMaster;", + "updateLive": "gulp & gulp updateLiveToBeta;", "browsertest": "sleep 5 && yarn run nightwatch_local", "csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/src/assets/css/font-awesome.min.css' apps/remix-ide/src/assets/css/", "downloadsolc_assets_e2e": "node ./apps/remix-ide/ci/download_e2e_assets.js", diff --git a/release-process.md b/release-process.md index a427255efc..7454fb07f0 100644 --- a/release-process.md +++ b/release-process.md @@ -11,6 +11,12 @@ This document includes the release instructions for: ## Feature Freeze Once feature freeze is done, `remix_beta` should be updated latest to the master which will automatically update `remix-beta.ethereum.org` through a CI job. +Use this unified command: + + - `yarn run updateBeta` + +or individually: + - `git checkout remix_beta` - `git pull origin remix_beta` - `git reset --hard ` (`master-commit-hash` will be latest commit id from `master` branch) @@ -54,6 +60,12 @@ Make sure release highlights and full changelog link is updated to show them on #### Make sure `remix_beta` is up-to-date with `master` branch: +Use this unified command: + + - `yarn run updateBeta` + +or individually: + - `git checkout remix_beta` - `git pull origin remix_beta` - `git reset --hard ` @@ -78,6 +90,12 @@ Make sure release highlights and full changelog link is updated to show them on Updating the `remix_live` branch latest to the `remix_beta` runs the CircleCI build which updates liver version of Remix IDE on `remix.ethereum.org` +Use this unified command: + + - `yarn run updateLive` + +or individually: + - `git checkout remix_live` - `git pull origin remix_live` - `git reset --hard ` or `` sometimes