task updated & comments added

pull/7/head
aniket-engg 5 years ago committed by Aniket
parent 03f3b2a98c
commit 3800c09e39
  1. 25
      gulpfile.js
  2. 2
      remix-lib/src/execution/txHelper.js

@ -1,24 +1,37 @@
#!/usr/bin/env node
'use strict';
var { task } = require('gulp');
var fs = require('fs');
const { task } = require('gulp');
const fs = require('fs');
const util = require('util');
const promisifyExec = util.promisify(require('child_process').exec);
var packageJSON = require('./package.json');
/**
* @dev Task to create git tag using version from package.json and pushing this specific tag
*/
task('publishTag', async function () {
await promisifyExec("git tag v"+ packageJSON.version +"; git push --tags");
const tag = "v" + packageJSON.version
await promisifyExec("git tag "+ tag +"; git push origin "+ tag);
});
/**
* @dev Task to update changelog for latest release
*/
task('updateChangelog', async function () {
let previous_version = process.argv[4];
let next_version = "v" + packageJSON.version;
const previous_version = process.argv[4];
const next_version = "v" + packageJSON.version;
// Create changes.md with latest release changelog temporarily
await promisifyExec("github-changes -o ethereum -r remix -a --file changes.md --only-pulls --use-commit-body --only-merges --between-tags " + previous_version + "..." + next_version);
let data = fs.readFileSync(__dirname + '/changes.md', 'utf8') + '\n\n' + fs.readFileSync(__dirname + '/CHANGELOG.md', 'utf8')
// Concat new changelog content to the top of old changelog file content
const data = fs.readFileSync(__dirname + '/changes.md', 'utf8') + '\n\n' + fs.readFileSync(__dirname + '/CHANGELOG.md', 'utf8')
// Delete current changelog file CHANGELOG.md
fs.unlinkSync(__dirname + '/CHANGELOG.md');
// Delete changes.md
fs.unlinkSync(__dirname + '/changes.md');
// Write the concated content to CHANGELOG.md (We delete and create file to place the new data on top)
fs.writeFileSync(__dirname + '/CHANGELOG.md', data);
await Promise.resolve();
});

@ -15,6 +15,8 @@ module.exports = {
if (funABI.inputs && funABI.inputs.length) {
for (var i = 0; i < funABI.inputs.length; i++) {
var type = funABI.inputs[i].type
// "false" will be converting to `false` and "true" will be working
// fine as abiCoder assume anything in quotes as `true`
if (type === 'bool' && args[i] === 'false') {
args[i] = false
}

Loading…
Cancel
Save