forked from mcneel/compute.rhino3d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
44 lines (39 loc) · 1.72 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
version: '{build}'
environment:
AWS_DEFAULT_REGION: us-east-1
# patch assembly info
assembly_info:
patch: true
file: '**\AssemblyInfo.cs'
assembly_version: '1.0.0.{version}'
# build
image: Visual Studio 2019
before_build:
- ps: (get-content .\src\compute.geometry\FixedEndpoints.cs).replace('git_sha = null', 'git_sha = "' + ${env:APPVEYOR_REPO_COMMIT}.Substring(0, 8) + '"') | set-content .\src\compute.geometry\FixedEndpoints.cs
build_script:
- msbuild src\compute.sln -restore -p:Configuration=Release -v:minimal -logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- 7z a -tzip -r compute.zip %APPVEYOR_BUILD_FOLDER%\src\bin\Release\compute.geometry\*
- msbuild src\compute.frontend -restore -p:Configuration=Release -v:minimal -logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# package artifacts and create codedeploy app revision
after_build:
- ps: |
md dist\src\bin
cp -r src\bin\Release dist\src\bin\
cp -r .codedeploy\* dist\
7z a -tzip -r compute-deploy-${env:APPVEYOR_BUILD_VERSION}.zip ${env:APPVEYOR_BUILD_FOLDER}\dist\*
artifacts:
- path: compute.zip
- path: compute-deploy-$(APPVEYOR_BUILD_VERSION).zip
deploy:
- provider: S3
region: $(AWS_DEFAULT_REGION)
access_key_id: $(AWS_ACCESS_KEY_ID)
secret_access_key: $(AWS_SECRET_ACCESS_KEY)
bucket: files.na.mcneel.com
folder: compute/deploy
# deploy to staging
after_deploy:
- ps: |
if($env:APPVEYOR_REPO_BRANCH -eq 'master') {
aws deploy create-deployment --application-name Compute_Staging --s3-location bucket=files.na.mcneel.com,key=compute/deploy/compute-deploy-${env:APPVEYOR_BUILD_VERSION}.zip,bundleType=zip --deployment-group-name compute-staging-dg
}