This commit is contained in:
Kyle Spearrin 2019-03-12 23:51:03 -04:00
parent e33e4f7044
commit 51215577a2
1 changed files with 10 additions and 6 deletions

View File

@ -20,9 +20,9 @@ init:
install: install:
- ps: | - ps: |
$PACKAGE_VERSION = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version $PACKAGE_VERSION = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version
$PROD_DEPLOY = $false $PROD_DEPLOY = "false"
if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") { if($env:APPVEYOR_REPO_TAG -eq "true" -and $env:APPVEYOR_RE_BUILD -eq "True") {
$PROD_DEPLOY = $true $PROD_DEPLOY = "true"
echo "This is a production deployment." echo "This is a production deployment."
} }
if($isWindows) { if($isWindows) {
@ -30,11 +30,10 @@ install:
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
} }
- sh: | - sh: |
echo "prod deploy: ${PROD_DEPLOY}"
if [ "${SNAP_TOKEN}" != "" ] if [ "${SNAP_TOKEN}" != "" ]
then then
echo "login to snap" echo "$SNAP_TOKEN" | snapcraft login --with -
echo "$SNAP_TOKEN" | snapcraft login --with -
snapcraft whoami
fi fi
before_build: before_build:
@ -62,7 +61,7 @@ build_script:
after_build: after_build:
- ps: | - ps: |
if($PROD_DEPLOY) { if($PROD_DEPLOY -eq "true") {
if($isLinux) { if($isLinux) {
echo "Deploy Linux..." echo "Deploy Linux..."
} }
@ -70,6 +69,11 @@ after_build:
echo "Deploy Windows..." echo "Deploy Windows..."
} }
} }
- sh: |
if [ "${SNAP_TOKEN}" != "" ]
then
snapcraft logout
fi
for: for:
- -