fix variables

This commit is contained in:
Kyle Spearrin 2019-03-12 23:41:53 -04:00
parent 1ff3ba6a18
commit df3983eed5
1 changed files with 15 additions and 14 deletions

View File

@ -19,10 +19,10 @@ init:
install: install:
- ps: | - ps: |
$packageVersion = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version $PACKAGE_VERSION = (Get-Content -Raw -Path .\src\package.json | ConvertFrom-Json).version
$prodDeploy = $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") {
$prodDeploy = $true $PROD_DEPLOY = $true
echo "This is a production deployment." echo "This is a production deployment."
} }
if($isWindows) { if($isWindows) {
@ -30,7 +30,8 @@ install:
cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git cloc --include-lang TypeScript,JavaScript,HTML,Sass,CSS --vcs git
} }
- sh: | - sh: |
if [ "${SNAP_TOKEN}" != "" -a "$prodDeploy" == "false" ] echo "prod deploy: ${PROD_DEPLOY}"
if [ "${SNAP_TOKEN}" != "" -a "${PROD_DEPLOY}" == "false" ]
then then
echo "login to snap" echo "login to snap"
echo "$SNAP_TOKEN" | snapcraft login --with - echo "$SNAP_TOKEN" | snapcraft login --with -
@ -46,23 +47,23 @@ build_script:
- ps: | - ps: |
if($isLinux) { if($isLinux) {
npm run dist:lin npm run dist:lin
Push-AppveyorArtifact ./dist/Bitwarden-${packageVersion}-x86_64.AppImage Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-x86_64.AppImage
Push-AppveyorArtifact ./dist/bitwarden_${packageVersion}_amd64.snap Push-AppveyorArtifact ./dist/bitwarden_${PACKAGE_VERSION}_amd64.snap
Push-AppveyorArtifact ./dist/Bitwarden-${packageVersion}-amd64.deb Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-amd64.deb
Push-AppveyorArtifact ./dist/Bitwarden-${packageVersion}-x64.freebsd Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-x64.freebsd
Push-AppveyorArtifact ./dist/Bitwarden-${packageVersion}-x86_64.rpm Push-AppveyorArtifact ./dist/Bitwarden-${PACKAGE_VERSION}-x86_64.rpm
} }
else { else {
npm run dist:win:ci npm run dist:win:ci
Push-AppveyorArtifact .\dist\Bitwarden-Portable-${packageVersion}.exe Push-AppveyorArtifact .\dist\Bitwarden-Portable-${PACKAGE_VERSION}.exe
Push-AppveyorArtifact .\dist\nsis-web\Bitwarden-Installer-${packageVersion}.exe Push-AppveyorArtifact .\dist\nsis-web\Bitwarden-Installer-${PACKAGE_VERSION}.exe
Push-AppveyorArtifact .\dist\Bitwarden-${packageVersion}-x64.appx Push-AppveyorArtifact .\dist\Bitwarden-${PACKAGE_VERSION}-x64.appx
Push-AppveyorArtifact .\dist\Bitwarden-${packageVersion}-ia32.appx Push-AppveyorArtifact .\dist\Bitwarden-${PACKAGE_VERSION}-ia32.appx
} }
after_build: after_build:
- ps: | - ps: |
if($prodDeploy) { if($PROD_DEPLOY) {
if($isLinux) { if($isLinux) {
echo "Deploy Linux..." echo "Deploy Linux..."
} }