Working on release deployment
This commit is contained in:
1 parent
ced828c401
commit
76bc9e93cb
3 files changed
+32
-23
No files matched your search
@@ -0,0 +1,17 @@
|
|||||||
|
$Env:NIGHTLY_BUILD = false
|
||||||
|
if($Env:APPVEYOR_REPO_TAG -ne "true") {
|
||||||
|
if($Env:APPVEYOR_REPO_BRANCH -eq "appveyorTest"){
|
||||||
|
$targetTag = "Nightly"
|
||||||
|
$Env:NIGHTLY_BUILD = true
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
Write-Host "No tag or special branch found"
|
||||||
|
Return
|
||||||
|
}
|
||||||
|
git config --global user.email "build@vocaluxe.de";
|
||||||
|
git config --global user.name "Vocaluxe_Automatic_Build";
|
||||||
|
git tag "$targetTag" -f;
|
||||||
|
git push -q -f "https://$($Env:GitHubKey):x-oauth-basic@github.com/lukeIam/Vocaluxe.git" "$targetTag";
|
||||||
|
|
||||||
|
Write-Host "Branch $Env:APPVEYOR_REPO_BRANCH -> Tag=$targetTag"
|
||||||
|
}
|
||||||
@@ -3,19 +3,7 @@ if($Env:APPVEYOR_REPO_TAG -eq "true") {
|
|||||||
Write-Host "Tag=$targetTag"
|
Write-Host "Tag=$targetTag"
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if($Env:APPVEYOR_REPO_BRANCH -eq "appveyorTest"){
|
Return;
|
||||||
$targetTag = "Nightly"
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
Write-Host "No tag or special branch found"
|
|
||||||
Return
|
|
||||||
}
|
|
||||||
git config --global user.email "build@vocaluxe.de";
|
|
||||||
git config --global user.name "Vocaluxe_Automatic_Build";
|
|
||||||
git tag "$targetTag" -f;
|
|
||||||
git push -q -f "https://$($Env:GitHubKey):x-oauth-basic@github.com/lukeIam/Vocaluxe.git" "$targetTag";
|
|
||||||
|
|
||||||
Write-Host "Branch $Env:APPVEYOR_REPO_BRANCH -> Tag=$targetTag"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$getRelaseInfoParams = @{
|
$getRelaseInfoParams = @{
|
||||||
@@ -31,15 +19,15 @@ catch [System.Net.WebException]
|
|||||||
$statusCode = [int]$_.Exception.Response.StatusCode
|
$statusCode = [int]$_.Exception.Response.StatusCode
|
||||||
$html = $_.Exception.Response.StatusDescription
|
$html = $_.Exception.Response.StatusDescription
|
||||||
Write-Host "No Release found for this tag ($html)"
|
Write-Host "No Release found for this tag ($html)"
|
||||||
Return
|
Return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$assetId = ($result.assets | where {$_.name -EQ "Vocaluxe_$Env:APPVEYOR_REPO_BRANCH_Windows_$Env:PLATFORM.zip" } | Select-Object -first 1 ).id
|
$assetId = ($result.assets | where {$_.name -EQ "Vocaluxe_$Env:APPVEYOR_REPO_TAG_NAME_Windows_$Env:PLATFORM.zip" } | Select-Object -first 1 ).id
|
||||||
|
|
||||||
if(!$assetId){
|
if(!$assetId){
|
||||||
# No matching asset found in this release
|
# No matching asset found in this release
|
||||||
Write-Host "No matching asset found in this release"
|
Write-Host "No matching asset found in this release: Vocaluxe_$Env:APPVEYOR_REPO_TAG_NAME_Windows_$Env:PLATFORM.zip"
|
||||||
Return
|
Return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$deleteAssetParams = @{
|
$deleteAssetParams = @{
|
||||||
@@ -60,6 +48,6 @@ catch [System.Net.WebException]
|
|||||||
$statusCode = [int]$_.Exception.Response.StatusCode
|
$statusCode = [int]$_.Exception.Response.StatusCode
|
||||||
$html = $_.Exception.Response.StatusDescription
|
$html = $_.Exception.Response.StatusDescription
|
||||||
Write-Host "Could not delete asset ($html)"
|
Write-Host "Could not delete asset ($html)"
|
||||||
Return
|
Return;
|
||||||
}
|
}
|
||||||
|
|
||||||
+9
-5
@@ -19,6 +19,9 @@ install:
|
|||||||
./.appveyor/gitDescribe.ps1
|
./.appveyor/gitDescribe.ps1
|
||||||
|
|
||||||
$Env:GIT_VERSION_TAG = $Env:VersionTag
|
$Env:GIT_VERSION_TAG = $Env:VersionTag
|
||||||
|
|
||||||
|
|
||||||
|
./.appveyor/moveTagForSpecialBranches.ps1
|
||||||
before_build:
|
before_build:
|
||||||
- ps: >-
|
- ps: >-
|
||||||
nuget restore -DisableParallelProcessing
|
nuget restore -DisableParallelProcessing
|
||||||
@@ -45,7 +48,7 @@ before_deploy:
|
|||||||
deploy:
|
deploy:
|
||||||
- provider: GitHub
|
- provider: GitHub
|
||||||
tag: $(APPVEYOR_REPO_TAG_NAME)
|
tag: $(APPVEYOR_REPO_TAG_NAME)
|
||||||
release: $(APPVEYOR_REPO_TAG_NAME) ({APPVEYOR_REPO_COMMIT_TIMESTAMP})
|
release: $(APPVEYOR_REPO_TAG_NAME) ($(APPVEYOR_REPO_COMMIT_TIMESTAMP))
|
||||||
description: 'Version: {GIT_VERSION_TAG}'
|
description: 'Version: {GIT_VERSION_TAG}'
|
||||||
auth_token:
|
auth_token:
|
||||||
secure: QBwVoI9PlI+PWfX8vtjH22cSPhj2nwJ78CQcwC4Olsibn1QNar2KX4HEfOGNbazA
|
secure: QBwVoI9PlI+PWfX8vtjH22cSPhj2nwJ78CQcwC4Olsibn1QNar2KX4HEfOGNbazA
|
||||||
@@ -53,13 +56,14 @@ deploy:
|
|||||||
prerelease: true
|
prerelease: true
|
||||||
on:
|
on:
|
||||||
APPVEYOR_REPO_TAG: true
|
APPVEYOR_REPO_TAG: true
|
||||||
|
NIGHTLY_BUILD: false
|
||||||
- provider: GitHub
|
- provider: GitHub
|
||||||
tag: Nightly
|
tag: $(APPVEYOR_REPO_TAG_NAME)
|
||||||
release: Current Nightly ({APPVEYOR_REPO_COMMIT_TIMESTAMP})
|
release: Latest Nightly build ($(APPVEYOR_REPO_COMMIT_TIMESTAMP))
|
||||||
description: 'Version: {GIT_VERSION_TAG}'
|
description: 'Version: {GIT_VERSION_TAG}'
|
||||||
auth_token:
|
auth_token:
|
||||||
secure: QBwVoI9PlI+PWfX8vtjH22cSPhj2nwJ78CQcwC4Olsibn1QNar2KX4HEfOGNbazA
|
secure: QBwVoI9PlI+PWfX8vtjH22cSPhj2nwJ78CQcwC4Olsibn1QNar2KX4HEfOGNbazA
|
||||||
artifact: ReleaseZip
|
artifact: ReleaseZip
|
||||||
on:
|
on:
|
||||||
branch: appveyorTest
|
APPVEYOR_REPO_TAG: true
|
||||||
APPVEYOR_PULL_REQUEST_NUMBER: ''
|
NIGHTLY_BUILD: true
|
||||||
Reference in new issue
Block a user