Skip to content
This repository was archived by the owner on May 19, 2020. It is now read-only.

Commit cc0fba2

Browse files
committed
Update build scripts to use Concourse
1 parent 9d19964 commit cc0fba2

File tree

10 files changed

+304
-198
lines changed

10 files changed

+304
-198
lines changed

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

build/resources/particle-code-signing-cert.p12.enc

Lines changed: 137 additions & 137 deletions
Large diffs are not rendered by default.

build/tasks/get-particle-dev-version.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ getParticleDevVersion = (cb) ->
77
# Get Particle Dev version from options/current sources
88
if !!_grunt.option('particleDevVersion')
99
cb _grunt.option('particleDevVersion')
10-
else if (!!process.env.TRAVIS_TAG or !!process.env.APPVEYOR_REPO_TAG_NAME) and !!process.env.PARTICLE_DEV_VERSION
10+
else if (!!process.env.IS_RELEASE) and !!process.env.PARTICLE_DEV_VERSION
1111
cb process.env.PARTICLE_DEV_VERSION
1212
else
1313
isRelease = false

build/tasks/patch-code.coffee

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pathFile = (patchFile, targetFile) ->
1212
patchFile = path.join(__dirname, 'patches', patchFile)
1313
targetFile = path.join(workDir, targetFile.replace('/', path.sep))
1414

15-
command = 'patch -i ' + patchFile + ' ' + targetFile
15+
command = 'patch --binary -i ' + patchFile + ' ' + targetFile
1616
result = cp.exec command, (error, stdout, stderr) ->
1717
if error
1818
console.log '', patchFile, 'failed'
@@ -89,8 +89,8 @@ module.exports = (grunt) ->
8989
pathFile 'darwin.patch', 'menus/darwin.cson'
9090
]
9191
else if process.platform is 'win32'
92-
return pathFile 'win32.patch', 'menus/win32.cson'
93-
else
92+
# return pathFile 'win32.patch', 'menus/win32.cson'
93+
else if process.platform is 'linux'
9494
return pathFile 'linux.patch', 'menus/linux.cson'
9595
]
9696

ci/darwin.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
platform: darwin
2+
3+
params:
4+
JANKY_BRANCH: stable
5+
TRAVIS: 1
6+
CI: 1
7+
HOME: /Users/administrator
8+
XCODE_KEYCHAIN: osx-build.keychain
9+
ATOM_MAC_CODE_SIGNING_KEYCHAIN: osx-build.keychain
10+
NODE_VERSION: 6.9.4
11+
BUILD_NODE_VERSION: 6.9.4
12+
BUILD_ATOM_RELEASES_S3_BUCKET: particle-dev-releases
13+
IS_RELEASE: ((IS_RELEASE))
14+
PARTICLE_DEV_VERSION: ((PARTICLE_DEV_VERSION))
15+
ATOM_ACCESS_TOKEN: ((ATOM_ACCESS_TOKEN))
16+
XCODE_KEYCHAIN_PASSWORD: ((XCODE_KEYCHAIN_PASSWORD))
17+
KEY_PASSWORD: ((KEY_PASSWORD))
18+
ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD: ((XCODE_KEYCHAIN_PASSWORD))
19+
ATOM_MAC_CODE_SIGNING_CERT_PASSWORD: ((KEY_PASSWORD))
20+
BUILD_ATOM_RELEASES_S3_KEY: ((BUILD_ATOM_RELEASES_S3_KEY))
21+
BUILD_ATOM_RELEASES_S3_SECRET: ((BUILD_ATOM_RELEASES_S3_SECRET))
22+
23+
run:
24+
path: sources/script/build-darwin
25+
26+
inputs:
27+
- name: sources
28+
29+
outputs:
30+
- name: artefacts

ci/win-x64.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
platform: windows
2+
3+
params:
4+
NODE_ARCH: 64
5+
JANKY_BRANCH: stable
6+
TRAVIS: 1
7+
CI: 1
8+
BUILD_NODE_VERSION: 6.9.4
9+
npm_config_runtime: electron
10+
BUILD_ATOM_RELEASES_S3_BUCKET: particle-dev-releases
11+
IS_RELEASE: ((IS_RELEASE))
12+
ENCRYPTION_SECRET: ((ENCRYPTION_SECRET))
13+
ATOM_ACCESS_TOKEN: ((ATOM_ACCESS_TOKEN))
14+
KEY_PASSWORD: ((ATOM_WIN_CODE_SIGNING_CERT_PASSWORD))
15+
ATOM_WIN_CODE_SIGNING_CERT_PASSWORD: ((ATOM_WIN_CODE_SIGNING_CERT_PASSWORD))
16+
BUILD_ATOM_RELEASES_S3_KEY: ((BUILD_ATOM_RELEASES_S3_KEY))
17+
BUILD_ATOM_RELEASES_S3_SECRET: ((BUILD_ATOM_RELEASES_S3_SECRET))
18+
19+
run:
20+
path: powershell.exe
21+
args: ["sources/script/build-windows.ps1"]
22+
23+
inputs:
24+
- name: sources
25+
26+
outputs:
27+
- name: artefacts

ci/win.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
platform: windows
2+
3+
params:
4+
NODE_ARCH: 32
5+
JANKY_BRANCH: stable
6+
TRAVIS: 1
7+
CI: 1
8+
BUILD_NODE_VERSION: 6.9.4
9+
npm_config_runtime: electron
10+
BUILD_ATOM_RELEASES_S3_BUCKET: particle-dev-releases
11+
IS_RELEASE: ((IS_RELEASE))
12+
ENCRYPTION_SECRET: ((ENCRYPTION_SECRET))
13+
ATOM_ACCESS_TOKEN: ((ATOM_ACCESS_TOKEN))
14+
KEY_PASSWORD: ((ATOM_WIN_CODE_SIGNING_CERT_PASSWORD))
15+
ATOM_WIN_CODE_SIGNING_CERT_PASSWORD: ((ATOM_WIN_CODE_SIGNING_CERT_PASSWORD))
16+
BUILD_ATOM_RELEASES_S3_KEY: ((BUILD_ATOM_RELEASES_S3_KEY))
17+
BUILD_ATOM_RELEASES_S3_SECRET: ((BUILD_ATOM_RELEASES_S3_SECRET))
18+
19+
run:
20+
path: powershell.exe
21+
args: ["sources/script/build-windows.ps1"]
22+
23+
inputs:
24+
- name: sources
25+
26+
outputs:
27+
- name: artefacts

script/add-key.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
openssl aes-256-cbc -k %ENCRYPTION_SECRET% -in .\build\resources\particle-code-signing-cert.p12.enc -out .\build\resources\particle-code-signing-cert.p12 -d -a
2-
certutil -p %KEY_PASSWORD% -user -importpfx .\build\resources\particle-code-signing-cert.p12 NoRoot
1+
openssl aes-256-cbc -k %ENCRYPTION_SECRET% -md md5 -in %ATOM_WIN_CODE_SIGNING_ENC_CERT_PATH% -out %ATOM_WIN_CODE_SIGNING_CERT_PATH% -a -d
2+
certutil -p %ATOM_WIN_CODE_SIGNING_CERT_PASSWORD% -user -importpfx .\build\resources\particle-code-signing-cert.p12 NoRoot

script/build-darwin

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
3+
# set -e -x
4+
function realpath { echo $(cd $(dirname $1); pwd)/$(basename $1); }
5+
6+
BASH_SOURCE_PATH=`dirname $BASH_SOURCE`
7+
SCRIPT_PATH=`realpath $BASH_SOURCE_PATH`
8+
BUILD_PATH=`realpath $SCRIPT_PATH/../build`
9+
RESOURCES_PATH=$BUILD_PATH/resources
10+
11+
# Cache buster
12+
# rm -rf sources/build/node_modules && rm -rf sources/dist/atom-work-dir/node_modules
13+
14+
# install
15+
git clone https://github.com/creationix/nvm.git .nvm
16+
source .nvm/nvm.sh
17+
nvm install $BUILD_NODE_VERSION
18+
nvm use --delete-prefix $BUILD_NODE_VERSION
19+
20+
cd sources
21+
# before_script
22+
export ATOM_MAC_CODE_SIGNING_CERT_PATH="$RESOURCES_PATH/key.p12"
23+
./script/add-key
24+
export JANKY_SHA1=`git rev-parse --short HEAD`
25+
source .atomrc
26+
27+
# script
28+
./script/build
29+
30+
# after_script
31+
./script/remove-key
32+
cd ..
33+
34+
# Move the artefacts
35+
cp -R sources/dist/atom-work-dir/out/ artefacts

script/build-windows.ps1

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
echo "--> Installing Node.js..."
2+
$env:NVM_HOME = "c:\nvm"
3+
$env:Path += ";$env:NVM_HOME"
4+
#nvm install $env:BUILD_NODE_VERSION
5+
nvm use $env:BUILD_NODE_VERSION $env:NODE_ARCH
6+
$env:Path += ";$env:NVM_HOME\v$env:BUILD_NODE_VERSION"
7+
#npm install -g npm
8+
9+
echo "--> Adding other dependencies..."
10+
choco install patch
11+
$env:Path += ";C:\ProgramData\chocolatey\lib\patch\tools\bin"
12+
choco install git
13+
$env:Path += ";C:\Program Files\Git\bin"
14+
choco install 7zip
15+
$env:Path += ";c:\program files\7-zip"
16+
17+
cd sources
18+
echo "--> Adding signing key..."
19+
choco install openssl.light
20+
$env:Path += ";c:\Program Files\OpenSSL\bin"
21+
$env:Pwd = (Get-Item -Path ".\" -Verbose).FullName
22+
$env:ATOM_WIN_CODE_SIGNING_CERT_PATH = "$env:Pwd\build\resources\particle-code-signing-cert.p12"
23+
$env:ATOM_WIN_CODE_SIGNING_ENC_CERT_PATH = "$env:Pwd\build\resources\particle-code-signing-cert.p12.enc"
24+
.\script\add-key.cmd
25+
26+
# Set env
27+
$env:USERPROFILE = "c:\home"
28+
$env:Path += ";C:\Windows\SysWOW64\config\systemprofile\.windows-build-tools\python27\"
29+
$env:Path += ";$env:NVM_HOME\v$env:BUILD_NODE_VERSION\node_modules\.bin"
30+
$env:Path += ";$env:NVM_HOME\v$env:BUILD_NODE_VERSION\node_modules\npm\bin\node-gyp-bin"
31+
$env:Path += ";$env:NVM_HOME\v$env:BUILD_NODE_VERSION\windows-build-tools\node_modules\.bin"
32+
$env:GYP_MSVS_VERSION = "2015"
33+
34+
echo "--> Starting build..."
35+
.\script\build.cmd
36+
cd ..
37+
38+
echo "--> Copying artifacts..."
39+
$env:Pwd = (Get-Item -Path ".\" -Verbose).FullName
40+
$sourceDir = "c:\atom-work-dir\out"
41+
$targetDir = "$env:Pwd\artefacts"
42+
Get-ChildItem -Path $sourceDir | Copy-Item -Destination $targetDir -Recurse -Container

0 commit comments

Comments
 (0)