Skip to content

Commit 8b4e1c9

Browse files
authored
fix release script [ci skip]
fix release script [ci skip]
2 parents 6a92a05 + 93e961d commit 8b4e1c9

File tree

4 files changed

+23
-17
lines changed

4 files changed

+23
-17
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/release
12
/dist
23
/docs
34
/lib

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![master build](https://img.shields.io/travis/com/eidng8/vue-tree?color=333&logo=travis)](https://travis-ci.com/eidng8/vue-tree) [![vulnerabilities](https://img.shields.io/snyk/vulnerabilities/github/eidng8/vue-tree?color=333&logo=snyk)](https://snyk.io/test/github/eidng8/vue-tree?targetFile=package.json) [![maintainability](https://img.shields.io/codeclimate/maintainability/eidng8/vue-tree?color=333&logo=code-climate)](https://codeclimate.com/github/eidng8/vue-tree/maintainability) [![master coverage](https://img.shields.io/coveralls/github/eidng8/vue-tree/master?color=333&logo=coveralls)](https://coveralls.io/github/eidng8/vue-tree?branch=master) [![dev build](https://img.shields.io/travis/com/eidng8/vue-tree/dev?color=333&label=dev%20build&logo=travis)](https://travis-ci.com/eidng8/vue-tree/tree/dev) [![dev coverage](https://img.shields.io/coveralls/github/eidng8/vue-tree/dev?color=333&label=dev%20coverage&logo=coveralls)](https://coveralls.io/github/eidng8/vue-tree?branch=dev)
44

5-
A Vue.js tree view component with stable DOM tree. By stable, it means the DOM structure will not change once it is rendered.
5+
A Vue tree view component with stable DOM structure. By stable, it means the DOM structure will not change once it is rendered.
66

77
## Performance Consideration
88

scripts/make-release-note.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ function updateReleaseNotes(log) {
4848
// extract current version log to release notes
4949
const match = /## \[.+?## \[/ms.exec(log)[0];
5050
const note = path.resolve(path.join(__dirname, '../RELEASE.md'));
51-
const text =
52-
`# Release version ${version}\n\n` + match.substr(0, match.length - 4);
51+
const text = `# Vue-Tree v${version}
52+
53+
A Vue tree view component with stable DOM structure.
54+
Released under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
55+
56+
57+
${match.substr(0, match.length - 4)}`;
5358
fs.writeFileSync(note, text, {
5459
encoding: 'utf-8',
5560
flag: 'w+',

scripts/release.bat

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@ set CWD=%cd%
66
cd /d "%~dp0"
77
cd ..
88

9-
for /f %%t in ('git rev-parse --abbrev-ref HEAD') do set BRANCH=%%t
10-
if not "%BRANCH%"=="master" (
11-
echo You are not on master branch.
12-
goto ERR
13-
)
14-
15-
git reset --hard --quiet || goto ERR
16-
git clean -fdx --quiet || goto ERR
17-
git pull || goto ERR
9+
if exist release rd /s /q release
10+
mkdir release
11+
cd release
12+
git clone --branch master "https://github.com/eidng8/vue-tree.git"
1813

1914
set RELEASE=%1
2015
if "%RELEASE%"=="" set RELEASE=patch
2116
call npm --no-git-tag-version version "%RELEASE%" || goto ERR
2217

2318
bash.exe -lc github_changelog_generator || goto ERR
24-
for /f "tokens=*" %%v in ('node scripts\make-release-note.js') do set version=%%v
25-
git add CHANGELOG.md || goto ERR
26-
git add RELEASE.md || goto ERR
19+
for /f "tokens=*" %%v in ('node scripts\make-release-note.js') do set VERSION=%%v
20+
21+
git add . || goto ERR
2722
git commit -m "Release %VERSION%" || goto ERR
28-
git tag -s --file=RELEASE.md "Release-v%VERSION%"
23+
git tag --sign --file=RELEASE.md "Release-v%VERSION%"
2924
git push --follow-tags || goto ERR
3025

3126
goto END
3227

3328

3429
:ERR
35-
pause
30+
echo Error occurred!
31+
cd ..
32+
rd /s /q release
3633
cd "%CWD%"
34+
pause
3735
exit 1
3836

3937
:END
38+
cd ..
39+
rd /s /q release
4040
cd "%CWD%"

0 commit comments

Comments
 (0)