-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathappveyor.yml
117 lines (102 loc) · 3.67 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Make sure we are using correct line endings for win
init:
- git config --global core.autocrlf true
# We only want things super fresh
platform: x64
# Test against this version of Node.js
environment:
nodejs_version: "4.2"
# Install scripts.
install:
# Get the latest stable version of Node.js or io.js
- ps: Install-Product node $env:nodejs_version x64
- ps: >-
$temp_dir = $env:TMP;
$jx_url = "https://raw.githubusercontent.com/jxcore/jxcore-release/master/0311/jx_winsetup.zip";
$jx_dest = "$temp_dir\jx_winsetup.zip";
$jx_installer = "$temp_dir\jx_winsetup\JXcore_setup.exe";
$webclient = New-Object System.Net.WebClient;
$webclient.DownloadFile($jx_url, $jx_dest);
$shell = new-object -com shell.application;
New-Item -ItemType Directory -Force -Path $temp_dir -WarningAction SilentlyContinue;
$shell.namespace($temp_dir).copyhere($shell.namespace("$jx_dest").items());
Start-Process -Wait $jx_installer '/SP /SILENT /VERYSILENT /SUPRESSMSGBOXES /NOCANCEL /NOREBOOT /NORESTART /CLOSEAPPLICATIONS';
$env:PATH = $env:PATH + ";C:\Program Files (x86)\JXcore";
Write-Host $env:PATH;
[System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions");
$ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer;
$json = Get-Content "package.json" | Out-String;
$obj = $ser.DeserializeObject($json);
$env:KALABOX_VERSION = $obj['version'];
Write-Host $env:KALABOX_VERSION;
$env:KALABOX_HASH = git rev-parse --short HEAD | Out-String;
Write-Host $env:KALABOX_HASH;
# install relevant things
- npm install -g grunt-cli
# Sanity checks
- node --version
- npm --version
- grunt --version
- jx --version
- jx --jxversion
# Build the things
- npm install
# Custom test script
test_script:
# Run basic tests
- grunt test:code
- grunt test:unit
# Custom build script
build_script:
# Build dev releases
- grunt pkg --dev
- mkdir dev_build
#- copy "dist\kbox-win32-x64-v%KALABOX_VERSION%.exe" "dev_build\kbox-win-x64-v%KALABOX_VERSION%-%KALABOX_HASH%-dev.exe"
- copy "dist\kbox-win32-x64-v%KALABOX_VERSION%.exe" "dev_build\kbox-win-x64-latest-dev.exe"
#- cmd: "dev_build\\kbox-win-x64-v%KALABOX_VERSION%-%KALABOX_HASH%-dev version"
- cmd: "dev_build\\kbox-win-x64-latest-dev version"
# Build prod releases
- grunt pkg
- mkdir prod_build
- copy "dist\kbox-win32-x64-v%KALABOX_VERSION%.exe" "prod_build\kbox-win-x64-v%KALABOX_VERSION%.exe"
- cmd: "prod_build\\kbox-win-x64-v%KALABOX_VERSION%.exe version"
# Where are our things
artifacts:
- path: dev_build/*.exe
name: development
- path: prod_build/*.exe
name: production
# Rename some stuff
after_build:
- ps: Get-ChildItem .\dev_build\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName s3 }
- ps: Get-ChildItem .\prod_build\*.exe | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName github }
# Deploymentzzz
deploy:
- provider: S3
access_key_id:
secure: t16g2geIvu5qJVSiPzqxzUnk4+p9X1psf6e8RmUJPDk=
secret_access_key:
secure: o/pYPIuDU8SPSrTB15BwzlLrDXGuhhTJUWdWMyvDLnsAwC6uJmASPEATUX9CFIEW
bucket: cli.kalabox.io
region: us-west-1
artifact: s3
on:
branch: v0.12
- provider: GitHub
description: v$(KALABOX_VERSION)
artifact: github
draft: false
auth_token:
secure: h95XRXK3tAJOZphssQ9dB3rpdK0y2I8VpakCR79+YwjZQOCW4YukAdCcwtBFdEoD
prerelease: false
on:
appveyor_repo_tag: true
# Notify of build stati
notifications:
# Email
- provider: Email
to:
on_build_status_changed: true