Skip to content

Commit

Permalink
update live
Browse files Browse the repository at this point in the history
  • Loading branch information
Aniket-Engg committed Dec 28, 2023
1 parent 99effce commit d97bae2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
33 changes: 25 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
});

/*
* @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();
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 18 additions & 0 deletions release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>` (`master-commit-hash` will be latest commit id from `master` branch)
Expand Down Expand Up @@ -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 <master-commit-hash>`
Expand All @@ -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 <remix_beta-commit-hash>` or `<master-commit-hash>` sometimes
Expand Down

0 comments on commit d97bae2

Please sign in to comment.