mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
chore(ci): fix version bump script by adding bump argument for target version;
This commit is contained in:
+8
-3
@@ -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!');
|
||||
});
|
||||
|
||||
@@ -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'));
|
||||
|
||||
Generated
+711
-600
File diff suppressed because it is too large
Load Diff
+5
-2
@@ -103,7 +103,7 @@
|
||||
"karma-sauce-launcher": "^4.3.6",
|
||||
"karma-sinon": "^1.0.5",
|
||||
"karma-sourcemap-loader": "^0.3.8",
|
||||
"minimist": "^1.2.6",
|
||||
"minimist": "^1.2.7",
|
||||
"mocha": "^10.0.0",
|
||||
"multer": "^1.4.4",
|
||||
"release-it": "^15.5.1",
|
||||
@@ -153,6 +153,9 @@
|
||||
],
|
||||
"sideEffects": false,
|
||||
"release-it": {
|
||||
"git": {
|
||||
"commitMessage": "chore(release): v${version}"
|
||||
},
|
||||
"github": {
|
||||
"release": true
|
||||
},
|
||||
@@ -168,7 +171,7 @@
|
||||
},
|
||||
"hooks": {
|
||||
"before:init": "npm test",
|
||||
"after:bump": "gulp version && npm run build && npm run test:build:version",
|
||||
"after:bump": "gulp version --bump ${version} && npm run build && npm run test:build:version",
|
||||
"after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user