github-release-from-changelog
Advanced tools
Comparing version 2.0.0 to 2.1.0
# `github-release-from-changelog` Changelog | ||
## 2.1.0 - 2019-09-20 | ||
- 😂 Fix a specific bug if a line contain a version similar to supported markdown title | ||
- 🎉 We now show a direct link to the release | ||
## 2.0.0 - 2019-09-20 | ||
@@ -4,0 +9,0 @@ |
@@ -118,10 +118,12 @@ #!/usr/bin/env node | ||
// ## [v1.0 | ||
var versionStartStringRe = "##? \\[?v?"; | ||
var versionStartStringRe = "^##? \\[?v?"; | ||
var versionStartRe = new RegExp(versionStartStringRe); | ||
var versionRe = new RegExp(versionStartStringRe + version.replace(/\./, ".")); | ||
var footerLinkRe = new RegExp("$\\["); | ||
var footerLinkRe = new RegExp("^\\["); | ||
changelogLines.some(function(line, i) { | ||
argv.debug && console.log("MATCH", line.match(versionRe)); | ||
if (!start && line.match(versionRe)) { | ||
start = true; | ||
argv.debug && console.log("START"); | ||
} else if ( | ||
@@ -131,7 +133,10 @@ start && | ||
) { | ||
argv.debug && console.log("END"); | ||
return true; | ||
} else if (start) { | ||
argv.debug && console.log(line); | ||
// between start & end, collect lines | ||
body.push(line); | ||
} | ||
argv.debug && console.log("IGNORED " + line); | ||
}); | ||
@@ -149,2 +154,5 @@ body = body.join("\n").trim(); | ||
var githubReleaseUrl = | ||
"https://github.com/" + user + "/" + repo + "/releases/tag/" + tagName; | ||
if (argv.dryRun) { | ||
@@ -157,3 +165,4 @@ console.log(tagName); | ||
console.log(); | ||
console.log(user + "/" + repo + " " + tagName + " NOT released"); | ||
console.log("NOT released, link below should not have the release notes"); | ||
console.log(githubReleaseUrl); | ||
} else { | ||
@@ -169,4 +178,4 @@ var token = process.env.GITHUB_TOKEN; | ||
} | ||
console.log(user + "/" + repo + " " + tagName + " released"); | ||
console.log(githubReleaseUrl); | ||
}); | ||
} |
{ | ||
"name": "github-release-from-changelog", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Create GitHub releases from CHANGELOG.md", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -31,2 +31,16 @@ # github-release-from-changelog | ||
### Options | ||
#### `--filename` | ||
Specify your own filename | ||
#### `--dryRun` | ||
Test what the release will looks like | ||
#### `--debug` | ||
Display parsing information | ||
## Advanced Installation and Usage | ||
@@ -33,0 +47,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14669
9
158
67