-
Notifications
You must be signed in to change notification settings - Fork 96
/
appveyor.yml
46 lines (39 loc) · 1.32 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
version: 1.0.{build}
branches:
# whitelist
only:
- sam-cli-release
image:
- macos-bigsur
# scripts that are called at very beginning, before repo cloning
init:
- git config --global core.autocrlf input
# scripts that run after cloning repository
for:
-
matrix:
only:
- image: macos-bigsur
before_build:
- echo "Mac don't need any before_build steps."
# Building bottles shell script.
build_script:
- brew tap aws/tap
- sudo bash ./replace-local-tap.sh
- ./build-formula.sh -f Formula/_aws-sam-cli.rb -u -b bottle-configs/aws-sam-cli.json
# since bottle is prefixed with '_', we need to run following steps to make it easy to use the bottle if needed
- cd build && for f in *.bottle.tar.gz; do mv -i -- "$f" "${f#*_}"; done # remove _ prefix from bottle name
- BOTTLE_FILE=(*.bottle.tar.gz)
# remove the underscore from folder inside tar.gz and re-pack it again
- mkdir tmp-bottle-folder
- tar -xf $BOTTLE_FILE -C tmp-bottle-folder
- cd tmp-bottle-folder
- mv _aws-sam-cli/ aws-sam-cli/
- tar -czvf $BOTTLE_FILE aws-sam-cli/
# go to build folder again, replace original tar.gz file with the one which is updated, clean tmp folders
- cd ..
- rm $BOTTLE_FILE
- mv tmp-bottle-folder/$BOTTLE_FILE ./
- rm -rf tmp-bottle-folder
artifacts:
- path: "build/*.bottle.tar.gz"