-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
347 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
PORT=3000 | ||
DB_NAME=MaumasiFy | ||
DB_USER=root | ||
DB_PW= | ||
DB_HOST=localhost | ||
DB_SCHEMA=mysql | ||
DB_PORT=3306 | ||
|
||
# Leave `DEBUG` as a blank value to be treated as false. | ||
# In the terminal stop the server and type `DEBUG=true node server.js` to enable debugging | ||
# logs show in the terminal. | ||
DEBUG= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
.DS_Store | ||
node_modules | ||
test | ||
.env | ||
env.json | ||
*.log | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
const gulp = require('gulp'); | ||
const git = require('gulp-git'); | ||
const replace = require('gulp-replace'); | ||
const gitignore = require('gulp-gitignore'); | ||
const argv = require('yargs').argv; | ||
|
||
const version = require('./package.json').version; | ||
|
||
|
||
const versionBump = require('log-me').bump; | ||
|
||
const testit = versionBump(version, 'patch'); | ||
|
||
// The main gulp calls are at the very bottom of this file. Those main calls being: | ||
// * gulp patch | ||
// * gulp minor | ||
// * gulp major | ||
|
||
// Run git add with options | ||
gulp.task('add', () => { | ||
return gulp.src('./*') | ||
.pipe(gitignore()) | ||
.pipe(git.add()); | ||
}); | ||
|
||
// Run git commit | ||
// src are the files to commit (or ./*) | ||
gulp.task('commit', () => { | ||
return gulp.src('./*') | ||
.pipe(gitignore()) | ||
.pipe(git.commit('auto commit')); | ||
}); | ||
|
||
// Run git push | ||
// remote is the remote repo | ||
// branch is the remote branch to push to | ||
gulp.task('push', () => { | ||
git.push('origin', 'newLogger', (err) => { | ||
if (err) throw err; | ||
}); | ||
}); | ||
|
||
// bump up the version according to 'patch', 'minor', 'major' | ||
gulp.task('patchBump', () => { | ||
console.log(testit); | ||
gulp.src(['./package.json']) | ||
.pipe(replace(`"version": "${version}"`, `"version": "${versionBump(version, 'patch')}"`)) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
|
||
gulp.task('minorBump', () => { | ||
gulp.src(['./package.json']) | ||
.pipe(replace(`"version": "${version}"`, `"version": "${versionBump(version, 'minor')}"`)) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
|
||
gulp.task('majorBump', () => { | ||
gulp.src(['./package.json']) | ||
.pipe(replace(`"version": "${version}"`, `"version": "${versionBump(version, 'major')}"`)) | ||
.pipe(gulp.dest('./')); | ||
}); | ||
|
||
// make version bumps by just calling the position bump as the flag | ||
let bump = ''; | ||
if (argv.patch) { | ||
bump = 'patch'; | ||
} else if (argv.minor) { | ||
bump = 'minor'; | ||
} else if (argv.major) { | ||
bump = 'major'; | ||
} | ||
|
||
gulp.task('default', [`${bump}Bump`, 'add', 'commit', 'push'], () => { | ||
console.log(version); | ||
}); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.