mirror of
https://github.com/GrapheneOS/matrix.grapheneos.org.git
synced 2025-04-17 06:22:58 -04:00
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.
This commit is contained in:
parent
d516e251bc
commit
fbf9b23cbf
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,5 +4,6 @@
|
||||
/cloud-archive-password.txt
|
||||
/lock
|
||||
/nginx-tmp/
|
||||
/static-deploy/
|
||||
/static-tmp/
|
||||
/venv/
|
||||
|
@ -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
|
||||
|
||||
remote=root@matrix.grapheneos.org
|
||||
|
||||
# use last modified timestamps from matrix.grapheneos.org
|
||||
rsync -rptcv --chmod=D755,F644 --delete --fsync --preallocate $remote:/srv/element.grapheneos.org/ 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/element.grapheneos.org)
|
||||
|
||||
if [[ $active = /srv/element.grapheneos.org_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/element.grapheneos.org && sync /srv/element.grapheneos.org"
|
||||
|
||||
echo "root $target;" > nginx-tmp/root_element.grapheneos.org.conf
|
||||
|
Loading…
x
Reference in New Issue
Block a user