Skip to content
This repository was archived by the owner on May 26, 2023. It is now read-only.

Commit 24dd269

Browse files
chore(bower): update bower release script
Closes angular-ui/ui-router#3556
1 parent 2163922 commit 24dd269

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

scripts/bower_release.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
#!env node
22
"use strict";
3-
4-
const version = require('../package.json').version;
3+
const fs = require('fs');
4+
const path = require('path');
55
const util = require('@uirouter/publish-scripts/util');
6-
const _exec = util._exec;
6+
const version = require('../package.json').version;
7+
// const _exec = util._exec;
8+
const _exec = console.log.bind(console);
9+
10+
util.packageDir();
11+
const bowerPath = path.resolve(__dirname, '..', 'bower.json');
12+
const bower = JSON.parse(fs.readFileSync(bowerPath));
13+
// util.ensureCleanMaster('master');
714

8-
util.ensureCleanMaster('master');
15+
// update bower.json
16+
bower.version = version;
17+
fs.writeFileSync(bowerPath, JSON.stringify(bower, null, 2));
18+
_exec(`git commit -m 'chore(bower): Update bower.json' bower.json`);
919

1020
// branch, add/commit release files, and push to bower repository
1121
_exec(`git checkout -b bower-${version}`);

0 commit comments

Comments
 (0)