-
Notifications
You must be signed in to change notification settings - Fork 86
/
appveyor.yml
52 lines (47 loc) · 2.06 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
version: v{build} # doesn't matter because gets overwritten later on with the package.json value
branches:
only:
- master
skip_non_tags: false
clone_depth: 1
environment:
nodejs_version: "14"
BONJOUR_SDK_HOME: 'C:\\Program Files\\Bonjour SDK'
BONJOUR_SDK_DOWNLOAD:
secure: 1uWToJLKf6uUn0/fsVHbrRSHDDgyxJ9KgD4cslGCqmz486RoS5levXRMLCKm3E7flrnyhSXcUWFHK9KcUxPlO2LYHYRVR+OGkndJ0fbrxhY=
image: Visual Studio 2019
install:
- ps: Install-Product node $env:nodejs_version x64
- set PATH=%programfiles(x86)%\\Microsoft SDKs\TypeScript\2.4;%PATH%
- appveyor DownloadFile https://github.com/fttx/barcode-to-pc-server/blob/master/electron/build/Bonjour64.msi?raw=true
- msiexec /i Bonjour64.msi /qn
- del Bonjour64.msi
- appveyor DownloadFile %BONJOUR_SDK_DOWNLOAD%
- bonjoursdksetup.exe /quiet
- del bonjoursdksetup.exe
- git config --global user.email "filippo.tortomasi@gmail.com"
- git config --global user.name "Filippo Tortomasi"
- ps: $env:package_version = (Get-Content -Raw -Path electron\package.json | ConvertFrom-Json).version # extract the version from package.json
- ps: Update-AppveyorBuild -Version "$env:package_version-$env:APPVEYOR_BUILD_NUMBER" # use the package.json version
# Remove certificateSha1 from package.json to avoid build error
- ps: $package_json = Get-Content -Raw -Path .\electron\package.json
- ps: $package_json = $package_json -replace ".*certificateSha1.*\r?\n" -replace ",(?=\r?\n\W+})"
- ps: $package_json_path = (Get-Item -Path "." -Verbose).FullName + '\electron\package.json'
- ps: $Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
- ps: "[System.IO.File]::WriteAllLines($package_json_path, $package_json, $Utf8NoBomEncoding)" # save the file as UTF-8 with no BOM
- npm cache verify
- cd electron
- npm ci --unsafe-perm
- set NODE_ENV=production
- set ECHO=ON
- echo "%PATH%"
- echo "%NODE_ENV%"
- node --version
- npm --version
build_script:
- cmd: npm run build
artifacts:
- path: \electron\dist\nsis-web
name: barcode-to-pc-server.offline-installer
type: zip
test: off