|
|
|
@ -5,6 +5,7 @@ const { task } = require('gulp'); |
|
|
|
|
const fs = require('fs'); |
|
|
|
|
const util = require('util'); |
|
|
|
|
const promisifyExec = util.promisify(require('child_process').exec); |
|
|
|
|
const axios = require('axios'); |
|
|
|
|
|
|
|
|
|
var packageJSON = require('./package.json'); |
|
|
|
|
|
|
|
|
@ -62,3 +63,20 @@ task('syncLibVersions', async function () { |
|
|
|
|
}) |
|
|
|
|
await Promise.resolve(); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
async function setBranchHead(branchName, head) { |
|
|
|
|
await promisifyExec(`git checkout ${branchName}`); |
|
|
|
|
await promisifyExec(`git pull origin ${branchName}`); |
|
|
|
|
await promisifyExec(`git reset --hard ${head}`); |
|
|
|
|
await promisifyExec(`git push -f origin ${branchName}`); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
* @dev Task to set remix_beta branch up to date with master |
|
|
|
|
*/ |
|
|
|
|
task('updateBeta', async function () { |
|
|
|
|
const masterBranchDetails = await axios.get('https://api.github.com/repos/ethereum/remix-project/branches/master') |
|
|
|
|
const masterBranchHead = masterBranchDetails.data.commit.sha |
|
|
|
|
await setBranchHead('remixbeta', masterBranchHead) |
|
|
|
|
await Promise.resolve(); |
|
|
|
|
}); |