Appveyor: add prepareDeploy.ps1 and gitDescribe.ps1

which is needed to use GitHub API to correctly tag automatic
builds, because git-describe doesn't work on shallow clones
This commit is contained in:
lukeIam authored and derivator committed 2015-12-06 13:42:29 +01:00
1 parent d4eb4f74c3
commit ced828c401
3 files changed
+144 -8

No files matched your search

+25 -8
View File
@@ -6,26 +6,42 @@ configuration: ReleaseWin
platform:
- x64
- x86
clone_depth: 1
clone_depth: 10
environment:
GitHubKey:
secure: QBwVoI9PlI+PWfX8vtjH22cSPhj2nwJ78CQcwC4Olsibn1QNar2KX4HEfOGNbazA
install:
- ps: >-
$Env:CurrentCommitSha = "$(git rev-parse --verify HEAD)"
$Env:githubRepoApiUri = "https://api.github.com/repos/Vocaluxe/Vocaluxe/"
./.appveyor/gitDescribe.ps1
$Env:GIT_VERSION_TAG = $Env:VersionTag
before_build:
- ps: >-
nuget restore -DisableParallelProcessing
(Get-Content -Encoding UTF8 'PitchTracker\PitchTracker.vcxproj') | Foreach-Object {$_ -replace 'v110_xp', 'v120_xp'} | Set-Content -Encoding UTF8 'PitchTracker\PitchTracker.vcxproj'
#(Get-Content -Encoding UTF8 'PitchTracker\PitchTracker.vcxproj') | Foreach-Object {$_ -replace 'v110_xp', 'v120_xp'} | Set-Content -Encoding UTF8 'PitchTracker\PitchTracker.vcxproj'
build:
project: Vocaluxe.sln
verbosity: normal
after_build:
- cd Output
- 7z a Vocaluxe_%APPVEYOR_REPO_BRANCH%_Windows_%PLATFORM%.zip *
- appveyor PushArtifact Vocaluxe_%APPVEYOR_REPO_BRANCH%_Windows_%PLATFORM%.zip -FileName Vocaluxe_%APPVEYOR_REPO_BRANCH%_Windows_%PLATFORM%.zip -DeploymentName ReleaseZip
- cd ..
- cmd: >-
cd Output
7z a Vocaluxe_%APPVEYOR_REPO_BRANCH%_Windows_%PLATFORM%.zip *
appveyor PushArtifact Vocaluxe_%APPVEYOR_REPO_BRANCH%_Windows_%PLATFORM%.zip -FileName Vocaluxe_%APPVEYOR_REPO_BRANCH%_Windows_%PLATFORM%.zip -DeploymentName ReleaseZip
cd ..
test: off
artifacts:
- path: Output\Vocaluxe_{APPVEYOR_REPO_BRANCH}_Windows_{PLATFORM}.zip
name: ReleaseZip
before_deploy:
- set GIT_VERSION_TAG=git describe --long
- ps: ./.appveyor/prepareDeploy.ps1
deploy:
- provider: GitHub
tag: $(APPVEYOR_REPO_TAG_NAME)
@@ -45,4 +61,5 @@ deploy:
secure: QBwVoI9PlI+PWfX8vtjH22cSPhj2nwJ78CQcwC4Olsibn1QNar2KX4HEfOGNbazA
artifact: ReleaseZip
on:
branch: appveyorTest
branch: appveyorTest
APPVEYOR_PULL_REQUEST_NUMBER: ''