Skip to content

Commit 7cf3955

Browse files
generate unique filenames for archives in check binary size script - appending the sha1 hash of the last commit of the current build (#1619)
1 parent 9e932ac commit 7cf3955

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ jobs:
147147
- run:
148148
name: Check & Publish Binary Size
149149
command: |
150-
./scripts/check_binary_size.sh ./scripts/paths_file.txt ./scripts/labels_file.txt 'mapbox-navigation-android' 'android' ./scripts/sdks_file.txt
150+
./scripts/check_binary_size.sh ./scripts/paths_file.txt ./scripts/labels_file.txt 'mapbox-navigation-android' 'android' ./scripts/sdks_file.txt "${CIRCLE_SHA1}"
151151
# ------------------------------------------------------------------------------
152152
publish:
153153
docker:

scripts/check_binary_size.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ repo_name=$3
1313
platform=$4
1414
# Argument 5 is a file including the different SDKs / modules (one per line) - Must match paths_file number of lines / size
1515
sdks_file=$5
16+
# Argument 6 is the commit SHA
17+
commit_sha=$6
1618

1719
source=mobile.binarysize
1820
scripts_path="scripts"
19-
json_name="$scripts_path/${repo_name}.json"
20-
json_gz="$scripts_path/${repo_name}.json.gz"
21+
json_name="$scripts_path/${repo_name}-${commit_sha}.json"
22+
json_gz="$scripts_path/${repo_name}-${commit_sha}.json.gz"
2123

2224
date=`date '+%Y-%m-%d'`
2325
utc_iso_date=`date -u +'%Y-%m-%dT%H:%M:%SZ'`

0 commit comments

Comments
 (0)