@rocket.chat/houston 0.27.0-next.0 → 0.27.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +3 -0
- package/dist/commands/createBranch.js +3 -3
- package/package.json +3 -3
- package/src/bin.js +4 -0
- package/bin/cli.js +0 -65
package/dist/bin.js
ADDED
|
@@ -147,11 +147,11 @@ function createBranch(_) {
|
|
|
147
147
|
}
|
|
148
148
|
function _createBranch() {
|
|
149
149
|
_createBranch = _async_to_generator(function(param) {
|
|
150
|
-
var base, type,
|
|
150
|
+
var base, type, mainPackageJson, _JSON_parse, currentVersion, newBranch, localBranch;
|
|
151
151
|
return _ts_generator(this, function(_state) {
|
|
152
152
|
switch(_state.label){
|
|
153
153
|
case 0:
|
|
154
|
-
base = param.base, type = param.type
|
|
154
|
+
base = param.base, type = param.type;
|
|
155
155
|
// checkout base version
|
|
156
156
|
return [
|
|
157
157
|
4,
|
|
@@ -166,7 +166,7 @@ function _createBranch() {
|
|
|
166
166
|
case 2:
|
|
167
167
|
mainPackageJson = _state.sent();
|
|
168
168
|
_JSON_parse = JSON.parse(mainPackageJson), currentVersion = _JSON_parse.version;
|
|
169
|
-
newBranch = "release-".concat(_semver.default.inc(currentVersion, type
|
|
169
|
+
newBranch = "release-".concat(_semver.default.inc(currentVersion, type));
|
|
170
170
|
return [
|
|
171
171
|
4,
|
|
172
172
|
git.branchLocal()
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rocket.chat/houston",
|
|
3
|
-
"version": "0.27.0-next.
|
|
3
|
+
"version": "0.27.0-next.2",
|
|
4
4
|
"description": "Rocket.Chat Command Line Tools",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/bin.js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/RocketChat/Rocket.Chat.Houston.git"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"private": false,
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"bin": {
|
|
19
|
-
"houston": "./dist/
|
|
19
|
+
"houston": "./dist/bin.js"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@actions/core": "^1.10.0",
|
package/src/bin.js
ADDED
package/bin/cli.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#! /usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const updateNotifier = require('update-notifier');
|
|
4
|
-
const program = require('commander');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
const gitUrlParse = require('git-url-parse');
|
|
7
|
-
const git = require('simple-git/promise')(process.cwd());
|
|
8
|
-
|
|
9
|
-
const pkg = require('../package.json');
|
|
10
|
-
updateNotifier({pkg}).notify();
|
|
11
|
-
|
|
12
|
-
const logs = require('../src/logs');
|
|
13
|
-
const md = require('../src/md');
|
|
14
|
-
const releaseTable = require('../src/release-table');
|
|
15
|
-
const setVersion = require('../src/set-version');
|
|
16
|
-
|
|
17
|
-
const getRepoInfo = async() => {
|
|
18
|
-
const remote = await git.listRemote(['--get-url', 'origin']);
|
|
19
|
-
|
|
20
|
-
const info = gitUrlParse(remote);
|
|
21
|
-
|
|
22
|
-
return {
|
|
23
|
-
owner: info.organization,
|
|
24
|
-
repo: info.name
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
let repoPkg = {};
|
|
29
|
-
try {
|
|
30
|
-
repoPkg = require(path.resolve(process.cwd(), './package.json'));
|
|
31
|
-
} catch (e) {
|
|
32
|
-
//
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
program
|
|
36
|
-
.command('logs')
|
|
37
|
-
.description('Generate history.json')
|
|
38
|
-
.option('-h, --head_name <name>', 'Name of the new release. Will rename the current HEAD section')
|
|
39
|
-
.option('-t, --min_tag <tag>', 'Minimum tag to scrap the history')
|
|
40
|
-
.action(async function({head_name, min_tag}) {
|
|
41
|
-
logs({headName: head_name, minTag: min_tag, ...await getRepoInfo(), ...repoPkg.houston });
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
program
|
|
45
|
-
.command('md')
|
|
46
|
-
.description('Generate History.md from History.json')
|
|
47
|
-
.action(async function() {
|
|
48
|
-
md({ ...await getRepoInfo() });
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
program
|
|
52
|
-
.command('release-table')
|
|
53
|
-
.description('Generate a markdown table of supported versions')
|
|
54
|
-
.action(async function() {
|
|
55
|
-
releaseTable({ ...await getRepoInfo() });
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
program
|
|
59
|
-
.command('release')
|
|
60
|
-
.description('Release a new version')
|
|
61
|
-
.action(async function() {
|
|
62
|
-
setVersion(await getRepoInfo());
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
program.parse(process.argv);
|