Skip to content

Commit

Permalink
release version 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
John Ahigian committed Apr 29, 2021
1 parent ca700f9 commit fcc5e1d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
28 changes: 28 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "releasetrain",
"version": "1.1.0",
"description": "A helper package to improve your CICD workflow and node.js app release process, seek no more with releaseTrain!",
"main": "index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/johnhiggs/releaseTrain.git"
},
"author": "John Ahigian <[email protected]>",
"license": "MIT",
"scripts": {
"releaseTrain-cut": "git checkout -b RC-$npm_config_releaseVersion && git push -u origin RC-$npm_config_releaseVersion",
"releaseTrain-notify": "node scripts/releaseTrain-notify",
"releaseTrain-config": "node scripts/setConfig.js --appName=$npm_config_appName --hookUrl=$npm_config_hookUrl --channel=$npm_config_channel --username=$npm_config_username --releaseVersion=$npm_config_releaseVersion"
},
"dependencies": {
"fs-extra": "^9.1.0",
"jest": "^26.6.3",
"jsonfile": "^6.1.0",
"node-slack": "^0.0.7"
},
"bugs": {
"url": "https://github.com/johnhiggs/releaseTrain/issues"
},
"homepage": "https://github.com/johnhiggs/releaseTrain#readme",
"devDependencies": {}
}
16 changes: 16 additions & 0 deletions scripts/releaseTrain-notify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const Slack = require('node-slack');
const fs = require('fs')
const configData = JSON.parse(fs.readFileSync('./config.json'))
const appName = configData.configuration.appName;
const releaseVersion = configData.configuration.releaseVersion;
const channel = configData.configuration.channel;
const username = configData.configuration.username;
const slack = new Slack(configData.configuration.hookUrl);

slack.send({
text: ':steam_locomotive: ' + appName + ' new release candidate has been cut successfully! <!here> :tada: \n :railway_track: branch: `RC-'+ releaseVersion + '`',
channel: '#'+channel,
username: username
});

// console.log(configData.configuration.hookUrl);
7 changes: 7 additions & 0 deletions scripts/setConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const jsonfile = require('jsonfile')
const argv = require('minimist')(process.argv.slice(2));

const file = './config.json'
const obj = { configuration: argv }

jsonfile.writeFileSync(file, obj)

0 comments on commit fcc5e1d

Please sign in to comment.