-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
0ad0c42
commit b6e664c
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,6 @@ | |
/lock-server | ||
/nginx-tmp/ | ||
/node_modules/ | ||
/static-deploy/ | ||
/static-tmp/ | ||
/venv/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
set -o errexit -o nounset -o pipefail | ||
|
||
shopt -s extglob | ||
|
||
touch lock | ||
exec {fd}< lock | ||
if ! flock -n $fd; then | ||
|
@@ -12,6 +14,14 @@ fi | |
./process-static $fd | ||
|
||
[email protected] | ||
|
||
# use last modified timestamps from attestation.app | ||
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/attestation.app/ static-deploy | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ static-deploy | ||
for f in static-deploy/**.*(br|gz); do | ||
touch -r "${f%.*}" "$f" | ||
done | ||
|
||
active=$(ssh $remote readlink /srv/attestation.app) | ||
|
||
if [[ $active = /srv/attestation.app_a ]]; then | ||
|
@@ -25,7 +35,7 @@ echo target is $target | |
echo | ||
|
||
ssh $remote "rm -rf $target && cp -a $active $target" | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-tmp/ $remote:$target | ||
rsync -rpcv --chmod=D755,F644 --delete --fsync --preallocate static-deploy/ $remote:$target | ||
ssh $remote "ln -snf $target /srv/attestation.app && sync /srv/attestation.app" | ||
|
||
echo "root $target;" > nginx-tmp/root_attestation.app.conf | ||
|