Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function gitCommit () {
// commit build and package.json with updated version number
return gulp.src([
path.join(srcDir, '*'),
'package.json',
'package-lock.json'
]).pipe(git.commit(gitCommitMessage))
}
gulp.task('tag', function() {
return gulp.src(['./package.json', './bower.json', './pivottable.jquery.json'])
.pipe(git.commit('version bump'))
// read only one file to get the version number
.pipe(filter('package.json'))
.pipe(tag_version());
});
function inc(importance) {
// get all the files to bump version in
return gulp.src(['./manifest.json','./package.json', './bower.json'])
// bump the version number in those files
.pipe(bump({type: importance}))
// save it back to filesystem
.pipe(gulp.dest('./'))
// commit the changed version number
.pipe(git.commit('bumps package version'))
// read only one file to get the version number
.pipe(filter('manifest.json'))
// **tag it in the repository**
.pipe(tag_version());
}
function inc(importance) {
// get all the files to bump version in
return gulp.src(['./package.json', './bower.json'])
// bump the version number in those files
.pipe(bump({type: importance}))
// save it back to filesystem
.pipe(gulp.dest('./'))
// commit the changed version number
.pipe(git.commit('bumps package version'))
// read only one file to get the version number
.pipe(filter('package.json'))
// **tag it in the repository**
.pipe(tag_version());
}
function inc(importance) {
// get all the files to bump version in
return gulp.src(['./package.json'])
// bump the version number in those files
.pipe(bump({type: importance}))
// save it back to filesystem
.pipe(gulp.dest('./'))
// commit the changed version number
.pipe(git.commit('Bumps package version'))
// read only one file to get the version number
.pipe(filter('package.json'))
// **tag it in the repository**
.pipe(tagVersion({ prefix: '' }));
}
gulp.task('push', ['check-coverage', 'minify'], function(){
var commitMessage = gulp.env.m || 'refactoring';
console.log('Tests passed! Pushing code...');
return gulp
.src('./.')
.pipe(git.add())
.pipe(git.commit(commitMessage))
.pipe(git.push());
});
gulp.task('git-commit', function(cb) {
gulp.src('.')
.pipe(git.add())
.pipe(git.commit("bump to " + args.tag))
.pipe(gcallback(cb))
});
gulp.task('release:commit', ['release:rebuild'], function() {
return gulp.src(['./package.json', 'dist/**/*'])
.pipe(git.add())
.pipe(git.commit(versionAfterBump));
});
function gitCommit () {
return gulp.src(['build/*', 'package.json', 'package-lock.json'])
.pipe(git.commit(gitCommitMessage))
}
var commitIt = function (version, cb) {
var commitMessage = "Bumps version to v" + version;
return gulp.src('./*.json', srcConfig).pipe(git.commit(commitMessage, {cwd: rootDir}))
.on('end', function () {
git.push('origin', currentBranch + ':' + branch, {cwd: rootDir}, cb);
});
};