@thisismanta/semantic-version 2.0.0-1 → 2.0.0-3

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.
@@ -33,8 +33,7 @@ const index_1 = require("./index");
33
33
  const debug_1 = require("./debug");
34
34
  main();
35
35
  async function main() {
36
- const lastVersion = semver_1.default.valid(await run('git describe --tags --abbrev=0') ||
37
- await run('npm pkg get version'));
36
+ const lastVersion = semver_1.default.valid(await run('npm pkg get version'));
38
37
  (0, debug_1.debug)('lastVersion »', JSON.stringify(lastVersion));
39
38
  if (!lastVersion) {
40
39
  throw new Error('Expect to have a last version on Git tag or package.json `version` field.');
@@ -106,12 +105,12 @@ async function main() {
106
105
  (0, debug_1.debug)('releaseNote »', releaseNote);
107
106
  const octokit = github.getOctokit(process.env.GITHUB_TOKEN);
108
107
  // See https://octokit.github.io/rest.js/v19#repos-create-release
109
- const octokitRespond = await octokit.rest.repos.createRelease({
108
+ const releaseRespond = await octokit.rest.repos.createRelease({
110
109
  ...github.context.repo,
111
110
  tag_name: nextVersion,
112
111
  body: releaseNote,
113
112
  });
114
- (0, debug_1.debug)('octokitRespond »', JSON.stringify(octokitRespond, null, 2));
113
+ (0, debug_1.debug)('releaseRespond »', JSON.stringify(releaseRespond, null, 2));
115
114
  console.log('Created a new release on GitHub');
116
115
  }
117
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thisismanta/semantic-version",
3
- "version": "2.0.0-1",
3
+ "version": "2.0.0-3",
4
4
  "author": "Anantachai Saothong <thisismanta@gmail.com>",
5
5
  "license": "ISC",
6
6
  "engines": {