How to use the branch function from yargs
Find comprehensive JavaScript yargs.branch code examples handpicked from public code repositorys.
GitHub: lucamug/elm-starter
74 75 76 77 78 79 80 81 82 83
commit = `commit-${NOT_AVAILABLE}`; } } if (argv.branch) { branch = argv.branch; } else { try { branch = child_process.execSync('git rev-parse --abbrev-ref HEAD').toString().replace(/^\s+|\s+$/g, ''); } catch(err) {
9
86
7
GitHub: ample/crds-corejs
43 44 45 46 47 48 49 50 51 52
}); gulp.task('versionAndPublish', ['bump', 'npmPublish']); gulp.task('tag', ['bump', 'npmPublish'], function(){ var branch = argv.branch; var pkg = require('./package.json'); var v = 'v' + pkg.version; var message = 'Release ' + v; if (!branch) {
2
0
5
+ 3 other calls in file
22 23 24 25 26 27 28 29 30 31 32
async function main() { if (!args.repoPath || !args.branch) { printUsage(); return; } else { BRANCH = args.branch; ANYTHINK_REPO_PATH = args.repoPath; } if (!process.env.API_SERVER_TOKEN) {
0
1
0
yargs.argv is the most popular function in yargs (1012 examples)