Skip to content

Commit 14fc078

Browse files
committed
change br/gz timestamps to match source files
This was lost as part of preserving existing file timestamps instead of using the timestamps from generated files.
1 parent 0ad0c42 commit 14fc078

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
/lock-server
99
/nginx-tmp/
1010
/node_modules/
11+
/static-deploy/
1112
/static-tmp/
1213
/venv/

deploy-static

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -o errexit -o nounset -o pipefail
44

5+
shopt -s extglob
6+
57
touch lock
68
exec {fd}< lock
79
if ! flock -n $fd; then
@@ -12,6 +14,14 @@ fi
1214
./process-static $fd
1315

1416
17+
18+
# use last modified timestamps from attestation.app
19+
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/attestation.app/ static-deploy
20+
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-deploy
21+
for f in static-deploy/**.*(br|gz); do
22+
touch -r ${f%.*} $f
23+
done
24+
1525
active=$(ssh $remote readlink /srv/attestation.app)
1626

1727
if [[ $active = /srv/attestation.app_a ]]; then
@@ -25,7 +35,7 @@ echo target is $target
2535
echo
2636

2737
ssh $remote "rm -rf $target && cp -a $active $target"
28-
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target
38+
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-deploy/ $remote:$target
2939
ssh $remote "ln -snf $target /srv/attestation.app && sync /srv/attestation.app"
3040

3141
echo "root $target;" > nginx-tmp/root_attestation.app.conf

0 commit comments

Comments
 (0)