Skip to content

Commit

Permalink
chore(ci): fix version bump script by adding bump argument for targ…
Browse files Browse the repository at this point in the history
…et version;
  • Loading branch information
DigitalBrainJS committed Dec 19, 2022
1 parent 75217e6 commit f12d01e
Show file tree
Hide file tree
Showing 3 changed files with 723 additions and 604 deletions.
11 changes: 8 additions & 3 deletions gulpfile.js
@@ -1,8 +1,11 @@
import gulp from 'gulp';
import fs from 'fs-extra';
import axios from './index.js';
import minimist from 'minimist'

gulp.task('default', async function(){
const argv = minimist(process.argv.slice(2));

gulp.task('default', async function(){
console.log('hello!');
});

Expand Down Expand Up @@ -70,8 +73,10 @@ const packageJSON = gulp.task('package', async function () {
const env = gulp.task('env', async function () {
var npm = JSON.parse(await fs.readFile('package.json'));

await fs.writeFile('./lib/env/data.js', Object.entries({
VERSION: npm.version
const envFilePath = './lib/env/data.js';

await fs.writeFile(envFilePath, Object.entries({
VERSION: (argv.bump || npm.version).replace(/^v/, '')
}).map(([key, value]) => {
return `export const ${key} = ${JSON.stringify(value)};`
}).join('\n'));
Expand Down

0 comments on commit f12d01e

Please sign in to comment.