-
Notifications
You must be signed in to change notification settings - Fork 96
/
appveyor-sam-cli-nightly.yml
44 lines (37 loc) · 1.3 KB
/
appveyor-sam-cli-nightly.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: 1.0.{build}
branches:
# whitelist
only:
- nightly-builds
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:
- ./build-formula.sh -f Formula/_aws-sam-cli-nightly.rb -b bottle-configs/aws-sam-cli-nightly.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-nightly/ aws-sam-cli-nightly/
- tar -czvf $BOTTLE_FILE aws-sam-cli-nightly/
# 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"