-
Notifications
You must be signed in to change notification settings - Fork 5
/
scripts.yml
55 lines (50 loc) · 1.69 KB
/
scripts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# scripts.yml
shell: powershell
variables:
VERSION_FILE: src/cli.js
update:
step_by_step: true
params: [ TARGET ]
script:
- npx npm-check-updates -u -t $env:TARGET
- npm install
- npm update
- npm audit fix
- npm run format:check
- npm run lint
- npm run build:assets
- npm test
release:
step_by_step: true
script:
- git switch develop
- $v = (Get-Version package.json).Split(".")
- $v[1] = "$([int]$v[1] + 1)"; $version = "$($v -join ".")"
- git flow release start "$version"
- Set-Version -Path package.json -Version "$version"
- Set-Version -Path $env:VERSION_FILE -Version "$version"
- npm install
- node ./src/cli.js --version
- echo "Update the changelog..."
- git add package*.json CHANGELOG.md $env:VERSION_FILE
- git commit -m "Bump the version number"
- git flow release finish "$version"
- echo "Push all -> 'git push --all origin'`nPush tags -> 'git push --tags'"
publish:
step_by_step: true
script:
- git switch main
- npm run build:assets
- npm pack
- rm *.tgz
- npm login
- npm publish
- npm logout
- git switch develop
profile:
script:
- New-Item -Type Directory .clinic/data -Force
- Get-Content README.md | Select-String -NotMatch -Pattern "shields.io" | Set-Content .clinic/data/doc-1.md -Encoding utf8
- 2..50 | ForEach-Object { Copy-Item .clinic/data/doc-1.md .clinic/data/doc-$_.md }
- npx clinic flame -- node src/cli.js .clinic/data/doc-*.md -l page -t github -s atom-one-light -n -c -x test/data/extension/uppercase_title.js
- Start-Process (Get-Item .clinic/*.html | Sort-Object -Property LastWriteTime -Descending | Select-Object -Last 1)