Skip to content

Commit 7d5e5b1

Browse files
committed
ENH: Update S3 skeleton only when there are updated files.
1 parent 44980ec commit 7d5e5b1

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.circleci/config.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,11 @@ jobs:
6666
cd /tmp/skel
6767
mkdir -p /tmp/resources
6868
zip -r /tmp/resources/templateflow-skel.zip */
69+
find . -type f -exec md5sum {} \; | sort -k 2 | md5sum > /tmp/resources/templateflow-skel.md5
6970
7071
- store_artifacts:
7172
path: /tmp/resources/templateflow-skel.zip
72-
73+
7374
- run:
7475
name: Run tests (w/ DataLad)
7576
command: |
@@ -189,16 +190,24 @@ jobs:
189190
fingerprints:
190191
- "ae:95:0c:cc:09:84:64:99:92:82:b7:b5:f4:a7:e9:23"
191192

193+
- run:
194+
name: Check whether skeleton needs an update
195+
command: |
196+
if cmp --silent /tmp/resources/templateflow-skel.md5 /tmp/src/templateflow/templateflow/conf/templateflow-skel.md5; then
197+
echo "S3 Skeleton has not changed"
198+
circleci step halt
199+
fi
200+
192201
- run:
193202
name: Push skeleton back to TemplateFlow's client repo
194203
command: |
195204
git config user.email "${GITHUB_EMAIL}"
196205
git config user.name "CircleCI Deploy"
197206
git fetch origin
198207
git checkout -f origin/master
199-
cp /tmp/resources/templateflow-skel.zip templateflow/conf/
200-
git add templateflow/conf/templateflow-skel.zip
201-
git commit -m "auto: Update S3 skeleton file [skip ci]"
208+
cp /tmp/resources/templateflow-skel.{zip,md5} templateflow/conf/
209+
git add templateflow/conf/templateflow-skel.{zip,md5}
210+
git commit -m "auto: Update S3 skeleton file and checksum [skip ci]"
202211
git push origin HEAD:master
203212
204213
deploy_pypi:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ae76daf5d6df0c4bb035e2bae06f8296 -

0 commit comments

Comments
 (0)