Skip to content

Commit 06139d5

Browse files
committed
(#7) Switched to custom 'deploy_script' for Appveyor since it does not provide a Script deployment provider
1 parent c8398dc commit 06139d5

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

.build/pre-release.ps1

Lines changed: 0 additions & 7 deletions
This file was deleted.

.build/release.ps1

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
npm publish
1+
function Pre-Release {
2+
$timestamp = Get-Date -Format yyyyMMddhhmmss
3+
$patchVersion = (npm --no-git-tag version patch)
4+
$nextVersion = "${patchVersion}-next.${timestamp}".Substring(1)
5+
echo $nextVersion
6+
7+
npm version --no-git-tag -f $nextVersion
8+
npm run publish:next
9+
}
10+
11+
function Release {
12+
npm publish
13+
}
14+
15+
if ($env:APPVEYOR_REPO_BRANCH -eq "develop") {
16+
Pre-Release
17+
} else if ($env:APPVEYOR_REPO_TAG -eq "true") {
18+
Release
19+
}

appveyor.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,8 @@ test_script:
3838
- npm cit
3939
- cd ../..
4040

41-
on_success:
42-
- IF defined APPVEYOR_REPO_TAG_NAME npm publish
43-
44-
deploy:
45-
- provider: Script
46-
path: ./.build/release.ps1
47-
on:
48-
APPVEYOR_REPO_TAG: true
49-
- provider: Script
50-
path: ./.build/pre-release.ps1
51-
on:
52-
branch: develop
41+
deploy_script:
42+
- cmd: powershell ./.build/release.ps1
5343

5444
build: off
5545
version: "{build}"

0 commit comments

Comments
 (0)