@rocket.chat/houston 0.27.0-next.0 → 0.27.0-next.1

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 ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ require("./cli");
@@ -147,11 +147,11 @@ function createBranch(_) {
147
147
  }
148
148
  function _createBranch() {
149
149
  _createBranch = _async_to_generator(function(param) {
150
- var base, type, identifier, mainPackageJson, _JSON_parse, currentVersion, newBranch, localBranch;
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, identifier = param.identifier;
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, identifier));
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.0",
3
+ "version": "0.27.0-next.1",
4
4
  "description": "Rocket.Chat Command Line Tools",
5
- "main": "dist/cli.js",
5
+ "main": "dist/bin.js",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/RocketChat/Rocket.Chat.Houston.git"
package/src/bin.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+
4
+ require('./cli');
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);