From ab8755955cde42781243edc3205ced046ad2d504 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sat, 8 Nov 2025 22:01:30 +0300 Subject: [PATCH 02/45] before latest committer cmd --- dbg.clone | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 dbg.clone diff --git a/dbg.clone b/dbg.clone new file mode 100755 index 0000000..b0487ec --- /dev/null +++ b/dbg.clone @@ -0,0 +1,22 @@ +#!/bin/bash +SDIR=$(cd "$(dirname "$0")" ; pwd -P) + +DST_DIR=/Users/mk/test-dist +REPO_URL=https://github.com/kornerr/ru + +# Clone since the directory does not exist +if [ ! -d "$DST_DIR" ]; then + git clone $REPO_URL $DST_DIR +fi + +# Pull the latest changes +cd $DST_DIR +git pull + +# Find out the latest branch +git branch -r --sort=-committerdate | head -n2 +branch=`git branch -r --sort=-committerdate | head -n2` +echo $branch + +# Switch to the latest branch +#git checkout $branch -- 2.34.1 From c04a258b0e424743a5ae9f421726c9ca4a9020e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sat, 8 Nov 2025 22:18:12 +0300 Subject: [PATCH 03/45] somewhere --- dbg.clone | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dbg.clone b/dbg.clone index b0487ec..cdbd3f3 100755 --- a/dbg.clone +++ b/dbg.clone @@ -3,6 +3,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist REPO_URL=https://github.com/kornerr/ru +TMP_BRANCHES=/tmp/dbg-branches # Clone since the directory does not exist if [ ! -d "$DST_DIR" ]; then @@ -13,10 +14,9 @@ fi cd $DST_DIR git pull -# Find out the latest branch -git branch -r --sort=-committerdate | head -n2 -branch=`git branch -r --sort=-committerdate | head -n2` -echo $branch +# Find out the latest commit in the whole repo +cmt=`git branch -av --sort=-committerdate | head -n1 | cut -d' ' -f4` +echo "Latest commit: $cmt" # Switch to the latest branch -#git checkout $branch +git checkout $cmt -- 2.34.1 From aaf14933e427cf13e056fe56f875a5a83294bdf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:30:00 +0300 Subject: [PATCH 04/45] checkout --- dbg.clone | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index cdbd3f3..b8d518d 100755 --- a/dbg.clone +++ b/dbg.clone @@ -2,6 +2,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist +MAIH_BRANCH=main REPO_URL=https://github.com/kornerr/ru TMP_BRANCHES=/tmp/dbg-branches @@ -12,11 +13,13 @@ fi # Pull the latest changes cd $DST_DIR +git chckout -f $MAIN_BRANCH git pull # Find out the latest commit in the whole repo +git branch -av --sort=-committerdate cmt=`git branch -av --sort=-committerdate | head -n1 | cut -d' ' -f4` echo "Latest commit: $cmt" # Switch to the latest branch -git checkout $cmt +#git checkout $cmt -- 2.34.1 From 136de7e1fd40b13754ce0a14344a94d16462d8ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:30:34 +0300 Subject: [PATCH 05/45] spell checkout --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index b8d518d..da452c0 100755 --- a/dbg.clone +++ b/dbg.clone @@ -13,7 +13,7 @@ fi # Pull the latest changes cd $DST_DIR -git chckout -f $MAIN_BRANCH +git checkout -f $MAIN_BRANCH git pull # Find out the latest commit in the whole repo -- 2.34.1 From 70d3823e6ed009d99aa65cd85d504744ca4a3cf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:31:20 +0300 Subject: [PATCH 06/45] typo --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index da452c0..5cc8453 100755 --- a/dbg.clone +++ b/dbg.clone @@ -2,7 +2,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist -MAIH_BRANCH=main +MAIN_BRANCH=main REPO_URL=https://github.com/kornerr/ru TMP_BRANCHES=/tmp/dbg-branches -- 2.34.1 From 213f3d3ba458bb9bc6ed3d9f1d151a156bf7f384 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:32:01 +0300 Subject: [PATCH 07/45] disable pull --- dbg.clone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbg.clone b/dbg.clone index 5cc8453..8ab7fd8 100755 --- a/dbg.clone +++ b/dbg.clone @@ -11,10 +11,10 @@ if [ ! -d "$DST_DIR" ]; then git clone $REPO_URL $DST_DIR fi -# Pull the latest changes +# ?? Pull the latest changes cd $DST_DIR git checkout -f $MAIN_BRANCH -git pull +#git pull # Find out the latest commit in the whole repo git branch -av --sort=-committerdate -- 2.34.1 From 99bc4c715f6fa2b0ab1d11c8126699a82e8aa7c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:32:14 +0300 Subject: [PATCH 08/45] co --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index 8ab7fd8..69216fa 100755 --- a/dbg.clone +++ b/dbg.clone @@ -22,4 +22,4 @@ cmt=`git branch -av --sort=-committerdate | head -n1 | cut -d' ' -f4` echo "Latest commit: $cmt" # Switch to the latest branch -#git checkout $cmt +git checkout $cmt -- 2.34.1 From a4991baadc99fe25be7c0e2f772ab0f776d1d821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:34:03 +0300 Subject: [PATCH 09/45] return pull --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index 69216fa..7174ef0 100755 --- a/dbg.clone +++ b/dbg.clone @@ -14,7 +14,7 @@ fi # ?? Pull the latest changes cd $DST_DIR git checkout -f $MAIN_BRANCH -#git pull +git pull # Find out the latest commit in the whole repo git branch -av --sort=-committerdate -- 2.34.1 From 52036271ced383a375e6f6e191994ec0ceb0e62e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:36:54 +0300 Subject: [PATCH 10/45] pull to fetch --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index 7174ef0..cb16876 100755 --- a/dbg.clone +++ b/dbg.clone @@ -14,7 +14,7 @@ fi # ?? Pull the latest changes cd $DST_DIR git checkout -f $MAIN_BRANCH -git pull +git fetch --all # Find out the latest commit in the whole repo git branch -av --sort=-committerdate -- 2.34.1 From 5ed91847fba324e5ee6a3359f499355e20d8a0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:37:34 +0300 Subject: [PATCH 11/45] clarify head --- dbg.clone | 1 + 1 file changed, 1 insertion(+) diff --git a/dbg.clone b/dbg.clone index cb16876..57b96d1 100755 --- a/dbg.clone +++ b/dbg.clone @@ -18,6 +18,7 @@ git fetch --all # Find out the latest commit in the whole repo git branch -av --sort=-committerdate +git branch -av --sort=-committerdate | head -n1 cmt=`git branch -av --sort=-committerdate | head -n1 | cut -d' ' -f4` echo "Latest commit: $cmt" -- 2.34.1 From faf0c5b23da303ea43fc9fd687f60224e623221b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:39:21 +0300 Subject: [PATCH 12/45] space --- dbg.clone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbg.clone b/dbg.clone index 57b96d1..454f048 100755 --- a/dbg.clone +++ b/dbg.clone @@ -18,8 +18,8 @@ git fetch --all # Find out the latest commit in the whole repo git branch -av --sort=-committerdate -git branch -av --sort=-committerdate | head -n1 -cmt=`git branch -av --sort=-committerdate | head -n1 | cut -d' ' -f4` +git branch -av --sort=-committerdate | tr -s ' ' | head -n1 +cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f4` echo "Latest commit: $cmt" # Switch to the latest branch -- 2.34.1 From 40d581031770b36c9027718d24197e9b4fce188d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:40:02 +0300 Subject: [PATCH 13/45] try 3 --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index 454f048..ae723a6 100755 --- a/dbg.clone +++ b/dbg.clone @@ -19,7 +19,7 @@ git fetch --all # Find out the latest commit in the whole repo git branch -av --sort=-committerdate git branch -av --sort=-committerdate | tr -s ' ' | head -n1 -cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f4` +cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3` echo "Latest commit: $cmt" # Switch to the latest branch -- 2.34.1 From 542f37a79f226d7546729aa66eb811f0c5bbfcd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:41:14 +0300 Subject: [PATCH 14/45] simplify --- dbg.clone | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dbg.clone b/dbg.clone index ae723a6..d0af619 100755 --- a/dbg.clone +++ b/dbg.clone @@ -2,7 +2,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist -MAIN_BRANCH=main +#MAIN_BRANCH=main REPO_URL=https://github.com/kornerr/ru TMP_BRANCHES=/tmp/dbg-branches @@ -13,12 +13,12 @@ fi # ?? Pull the latest changes cd $DST_DIR -git checkout -f $MAIN_BRANCH +#git checkout -f $MAIN_BRANCH git fetch --all # Find out the latest commit in the whole repo -git branch -av --sort=-committerdate -git branch -av --sort=-committerdate | tr -s ' ' | head -n1 +#git branch -av --sort=-committerdate +#git branch -av --sort=-committerdate | tr -s ' ' | head -n1 cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3` echo "Latest commit: $cmt" -- 2.34.1 From b99987ff565fd50dcf5c01a2bde0f9e8e3fa4de5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:41:46 +0300 Subject: [PATCH 15/45] argh --- dbg.clone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbg.clone b/dbg.clone index d0af619..7203f4c 100755 --- a/dbg.clone +++ b/dbg.clone @@ -2,7 +2,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist -#MAIN_BRANCH=main +MAIN_BRANCH=main REPO_URL=https://github.com/kornerr/ru TMP_BRANCHES=/tmp/dbg-branches @@ -13,7 +13,7 @@ fi # ?? Pull the latest changes cd $DST_DIR -#git checkout -f $MAIN_BRANCH +git checkout -f $MAIN_BRANCH git fetch --all # Find out the latest commit in the whole repo -- 2.34.1 From a80eb550b5765badd028e0ff307a4331f0eadb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:47:08 +0300 Subject: [PATCH 16/45] copy dist --- dbg.clone | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dbg.clone b/dbg.clone index 7203f4c..5d69b67 100755 --- a/dbg.clone +++ b/dbg.clone @@ -3,16 +3,17 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/Users/mk/test-dist MAIN_BRANCH=main +REPO_DIR=/Users/mk/test-repo REPO_URL=https://github.com/kornerr/ru TMP_BRANCHES=/tmp/dbg-branches # Clone since the directory does not exist -if [ ! -d "$DST_DIR" ]; then - git clone $REPO_URL $DST_DIR +if [ ! -d "$REPO_DIR" ]; then + git clone $REPO_URL $REPO_DIR fi -# ?? Pull the latest changes -cd $DST_DIR +# Get the latest changes +cd $REPO_DIR git checkout -f $MAIN_BRANCH git fetch --all @@ -22,5 +23,9 @@ git fetch --all cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3` echo "Latest commit: $cmt" -# Switch to the latest branch +# Switch to the latest commit git checkout $cmt + +# Copy dist +mkdir -p $DST_DIR +cp -R dist/* $DST_DIR -- 2.34.1 From 60eb51483e8b0a28eb8f53129e75a88a953ae3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:49:04 +0300 Subject: [PATCH 17/45] rm dist --- dbg.clone | 1 + 1 file changed, 1 insertion(+) diff --git a/dbg.clone b/dbg.clone index 5d69b67..168654b 100755 --- a/dbg.clone +++ b/dbg.clone @@ -28,4 +28,5 @@ git checkout $cmt # Copy dist mkdir -p $DST_DIR +rm -fR $DST_DIR/* cp -R dist/* $DST_DIR -- 2.34.1 From ff33b359febbc513eddfcbe8f20aba4c2ad93822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 06:50:27 +0300 Subject: [PATCH 18/45] rm tmp --- dbg.clone | 1 - 1 file changed, 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index 168654b..b739bd4 100755 --- a/dbg.clone +++ b/dbg.clone @@ -5,7 +5,6 @@ DST_DIR=/Users/mk/test-dist MAIN_BRANCH=main REPO_DIR=/Users/mk/test-repo REPO_URL=https://github.com/kornerr/ru -TMP_BRANCHES=/tmp/dbg-branches # Clone since the directory does not exist if [ ! -d "$REPO_DIR" ]; then -- 2.34.1 From 531150ba3061b0482d72c082b434eba9bf983b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 07:04:46 +0300 Subject: [PATCH 19/45] use prod dirs --- dbg.clone | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dbg.clone b/dbg.clone index b739bd4..9e3c2e5 100755 --- a/dbg.clone +++ b/dbg.clone @@ -1,9 +1,9 @@ #!/bin/bash SDIR=$(cd "$(dirname "$0")" ; pwd -P) -DST_DIR=/Users/mk/test-dist +DST_DIR=/var/www/dbg MAIN_BRANCH=main -REPO_DIR=/Users/mk/test-repo +REPO_DIR=/home/kornerr/repo-ru REPO_URL=https://github.com/kornerr/ru # Clone since the directory does not exist -- 2.34.1 From 705ad0531782019e96b8f549a92d2029162133a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 21:47:46 +0300 Subject: [PATCH 20/45] add dbg setup --- dbg.setup | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 dbg.setup diff --git a/dbg.setup b/dbg.setup new file mode 100755 index 0000000..351331d --- /dev/null +++ b/dbg.setup @@ -0,0 +1,4 @@ +#!/bin/bash +CMD="*/2 * * * * kornerr /home/kornerr/vps/dbg.clone" +CRON_FILE=/etc/cron.d/dbg +echo "$CMD" > $CRON_FILE -- 2.34.1 From c469f3fad03cbb22db7ee129e51cdeb20cb57380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Sun, 9 Nov 2025 22:33:31 +0300 Subject: [PATCH 21/45] sync at 20 00 --- dbg.setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.setup b/dbg.setup index 351331d..e3f0143 100755 --- a/dbg.setup +++ b/dbg.setup @@ -1,4 +1,4 @@ #!/bin/bash -CMD="*/2 * * * * kornerr /home/kornerr/vps/dbg.clone" +CMD="0 20 * * * kornerr /home/kornerr/vps/dbg.clone" CRON_FILE=/etc/cron.d/dbg echo "$CMD" > $CRON_FILE -- 2.34.1 From d9cbf934d9c7a182222cd15f1542a4a06169d0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 06:39:20 +0300 Subject: [PATCH 22/45] force --- dbg.clone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbg.clone b/dbg.clone index 9e3c2e5..0e25aa0 100755 --- a/dbg.clone +++ b/dbg.clone @@ -23,7 +23,7 @@ cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3 echo "Latest commit: $cmt" # Switch to the latest commit -git checkout $cmt +git checkout -f $cmt # Copy dist mkdir -p $DST_DIR -- 2.34.1 From b313665026e65bd80e2187afd75ae7f0872548fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 06:55:28 +0300 Subject: [PATCH 23/45] change cbr path --- cbr.get | 2 +- publish | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100755 publish diff --git a/cbr.get b/cbr.get index 66c2ee8..80833a4 100755 --- a/cbr.get +++ b/cbr.get @@ -1,4 +1,4 @@ #!/bin/bash URL=https://www.cbr.ru/scripts/XML_daily.asp -OUT=/var/www/html/cbr.xml +OUT=/var/www/html/cbr/cur.xml wget $URL -O $OUT diff --git a/publish b/publish new file mode 100755 index 0000000..a5997c0 --- /dev/null +++ b/publish @@ -0,0 +1,24 @@ +#!/bin/bash +SDIR=$(cd "$(dirname "$0")" ; pwd -P) + +DBG_DIR=/var/www/dbg +DST_DIR=/var/www/html + +rsync -aivc --delete $DBG_DIR + + +$CONNECT_SRC_DIR/Utilities/ucim-spm/local/ivac $DST_DIR/Modules + +# Find out the latest commit in the whole repo +#git branch -av --sort=-committerdate +#git branch -av --sort=-committerdate | tr -s ' ' | head -n1 +cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3` +echo "Latest commit: $cmt" + +# Switch to the latest commit +git checkout -f $cmt + +# Copy dist +mkdir -p $DST_DIR +rm -fR $DST_DIR/* +cp -R dist/* $DST_DIR -- 2.34.1 From 505504a521a5f29a8d42a527ae735c769593e9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 07:01:51 +0300 Subject: [PATCH 24/45] sym --- publish | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/publish b/publish index a5997c0..504e765 100755 --- a/publish +++ b/publish @@ -4,21 +4,10 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DBG_DIR=/var/www/dbg DST_DIR=/var/www/html -rsync -aivc --delete $DBG_DIR +# Copy dbg to prod +rsync -aivc --delete $DBG_DIR $DST_DIR - -$CONNECT_SRC_DIR/Utilities/ucim-spm/local/ivac $DST_DIR/Modules - -# Find out the latest commit in the whole repo -#git branch -av --sort=-committerdate -#git branch -av --sort=-committerdate | tr -s ' ' | head -n1 -cmt=`git branch -av --sort=-committerdate | tr -s ' ' | head -n1 | cut -d' ' -f3` -echo "Latest commit: $cmt" - -# Switch to the latest commit -git checkout -f $cmt - -# Copy dist -mkdir -p $DST_DIR -rm -fR $DST_DIR/* -cp -R dist/* $DST_DIR +# Symlink +cd $DST_DIR +ln -s ../cbr +ln -s ../dbg -- 2.34.1 From 3a121a98b6b64d89d34bdd437c717d611fb29f60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 07:03:00 +0300 Subject: [PATCH 25/45] fix --- publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish b/publish index 504e765..41bf7ab 100755 --- a/publish +++ b/publish @@ -5,7 +5,7 @@ DBG_DIR=/var/www/dbg DST_DIR=/var/www/html # Copy dbg to prod -rsync -aivc --delete $DBG_DIR $DST_DIR +rsync -aivc --delete $DBG_DIR/* $DST_DIR # Symlink cd $DST_DIR -- 2.34.1 From 4a19a428e8e2b640f89958b3b762aa183b9c2455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 07:04:48 +0300 Subject: [PATCH 26/45] rm --- publish | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/publish b/publish index 41bf7ab..e98e818 100755 --- a/publish +++ b/publish @@ -4,8 +4,11 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DBG_DIR=/var/www/dbg DST_DIR=/var/www/html +# Remove prod +rm -fR $DST_DIR/* + # Copy dbg to prod -rsync -aivc --delete $DBG_DIR/* $DST_DIR +rsync -aivc --delete $DBG_DIR $DST_DIR # Symlink cd $DST_DIR -- 2.34.1 From 0ab806a88ca72aed14479b2cce98f4f8f567bc57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 07:05:19 +0300 Subject: [PATCH 27/45] harder --- publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish b/publish index e98e818..1652539 100755 --- a/publish +++ b/publish @@ -5,7 +5,7 @@ DBG_DIR=/var/www/dbg DST_DIR=/var/www/html # Remove prod -rm -fR $DST_DIR/* +rm -fR $DST_DIR # Copy dbg to prod rsync -aivc --delete $DBG_DIR $DST_DIR -- 2.34.1 From 791f93149dd0e6e28bf669ad0f07380f84e890e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 07:07:00 +0300 Subject: [PATCH 28/45] ahm --- publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish b/publish index 1652539..458cc8f 100755 --- a/publish +++ b/publish @@ -8,7 +8,7 @@ DST_DIR=/var/www/html rm -fR $DST_DIR # Copy dbg to prod -rsync -aivc --delete $DBG_DIR $DST_DIR +rsync -aivc --delete $DBG_DIR/ $DST_DIR # Symlink cd $DST_DIR -- 2.34.1 From 344e72fec21fb4278d044edc4915032ca3cdc6c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:04:43 +0300 Subject: [PATCH 29/45] rename --- dbg.clone => publish.dbg | 0 publish => publish.prod | 0 dbg.setup => publish.setup | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename dbg.clone => publish.dbg (100%) rename publish => publish.prod (100%) rename dbg.setup => publish.setup (53%) diff --git a/dbg.clone b/publish.dbg similarity index 100% rename from dbg.clone rename to publish.dbg diff --git a/publish b/publish.prod similarity index 100% rename from publish rename to publish.prod diff --git a/dbg.setup b/publish.setup similarity index 53% rename from dbg.setup rename to publish.setup index e3f0143..d863c58 100755 --- a/dbg.setup +++ b/publish.setup @@ -1,4 +1,4 @@ #!/bin/bash -CMD="0 20 * * * kornerr /home/kornerr/vps/dbg.clone" +CMD="0 20 * * * kornerr /home/kornerr/vps/publish.dbg" CRON_FILE=/etc/cron.d/dbg echo "$CMD" > $CRON_FILE -- 2.34.1 From 3f25cf71eb41c912ce1c3b9a1930e24d17cae3e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:09:57 +0300 Subject: [PATCH 30/45] try to rename --- publish.dbg | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/publish.dbg b/publish.dbg index 0e25aa0..61cb01c 100755 --- a/publish.dbg +++ b/publish.dbg @@ -2,6 +2,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/var/www/dbg +KMP_FILE=korner-ver-browser.js MAIN_BRANCH=main REPO_DIR=/home/kornerr/repo-ru REPO_URL=https://github.com/kornerr/ru @@ -29,3 +30,7 @@ git checkout -f $cmt mkdir -p $DST_DIR rm -fR $DST_DIR/* cp -R dist/* $DST_DIR + +# Rename kornerr-ver-browser.js to work around caching +KMP_UUID=$((uuidgen))_$KMP_FILE +mv $DST_DIR/$KMP_FILE $DST_DIR/$KMP_UUID -- 2.34.1 From 79b4f0293b6e1d21ec6fada3804b59652ac04e1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:11:21 +0300 Subject: [PATCH 31/45] typo --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index 61cb01c..c7574e6 100755 --- a/publish.dbg +++ b/publish.dbg @@ -2,7 +2,7 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/var/www/dbg -KMP_FILE=korner-ver-browser.js +KMP_FILE=kornerr-ver-browser.js MAIN_BRANCH=main REPO_DIR=/home/kornerr/repo-ru REPO_URL=https://github.com/kornerr/ru -- 2.34.1 From 138a4a187064af10907f50f7323467d5f43010f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:12:15 +0300 Subject: [PATCH 32/45] try uuid more --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index c7574e6..08d7e65 100755 --- a/publish.dbg +++ b/publish.dbg @@ -32,5 +32,5 @@ rm -fR $DST_DIR/* cp -R dist/* $DST_DIR # Rename kornerr-ver-browser.js to work around caching -KMP_UUID=$((uuidgen))_$KMP_FILE +KMP_UUID=`uuidgen`_$KMP_FILE mv $DST_DIR/$KMP_FILE $DST_DIR/$KMP_UUID -- 2.34.1 From 54c3586d3c6992cd04a4e9eff48a9c8dbb361109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:14:27 +0300 Subject: [PATCH 33/45] try better name --- publish.dbg | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/publish.dbg b/publish.dbg index 08d7e65..27f67a7 100755 --- a/publish.dbg +++ b/publish.dbg @@ -2,7 +2,8 @@ SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/var/www/dbg -KMP_FILE=kornerr-ver-browser.js +KMP_FILE=kornerr-ver-browser +KMP_FILE_EXT=js MAIN_BRANCH=main REPO_DIR=/home/kornerr/repo-ru REPO_URL=https://github.com/kornerr/ru @@ -32,5 +33,5 @@ rm -fR $DST_DIR/* cp -R dist/* $DST_DIR # Rename kornerr-ver-browser.js to work around caching -KMP_UUID=`uuidgen`_$KMP_FILE -mv $DST_DIR/$KMP_FILE $DST_DIR/$KMP_UUID +KMP_UUID=$KMP_FILE-`uuidgen`.$KMP_FILE_EXT +mv $DST_DIR/$KMP_FILE.$KMP_FILE_EXT $DST_DIR/$KMP_UUID -- 2.34.1 From aff1b8b20838d49c60a313cbe632e232e675cf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:15:21 +0300 Subject: [PATCH 34/45] better --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index 27f67a7..60239e4 100755 --- a/publish.dbg +++ b/publish.dbg @@ -33,5 +33,5 @@ rm -fR $DST_DIR/* cp -R dist/* $DST_DIR # Rename kornerr-ver-browser.js to work around caching -KMP_UUID=$KMP_FILE-`uuidgen`.$KMP_FILE_EXT +KMP_UUID=$KMP_FILE_`uuidgen`.$KMP_FILE_EXT mv $DST_DIR/$KMP_FILE.$KMP_FILE_EXT $DST_DIR/$KMP_UUID -- 2.34.1 From 6b6f42ba0bf4ea7d4e0ff67380694545bdcd7cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:16:03 +0300 Subject: [PATCH 35/45] ah --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index 60239e4..38acd29 100755 --- a/publish.dbg +++ b/publish.dbg @@ -33,5 +33,5 @@ rm -fR $DST_DIR/* cp -R dist/* $DST_DIR # Rename kornerr-ver-browser.js to work around caching -KMP_UUID=$KMP_FILE_`uuidgen`.$KMP_FILE_EXT +KMP_UUID=${KMP_FILE}_`uuidgen`.$KMP_FILE_EXT mv $DST_DIR/$KMP_FILE.$KMP_FILE_EXT $DST_DIR/$KMP_UUID -- 2.34.1 From f5f0aa755ef924ef37997749f2ebd7f08f328064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:19:47 +0300 Subject: [PATCH 36/45] try ref --- publish.dbg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/publish.dbg b/publish.dbg index 38acd29..e4371e9 100755 --- a/publish.dbg +++ b/publish.dbg @@ -33,5 +33,9 @@ rm -fR $DST_DIR/* cp -R dist/* $DST_DIR # Rename kornerr-ver-browser.js to work around caching -KMP_UUID=${KMP_FILE}_`uuidgen`.$KMP_FILE_EXT -mv $DST_DIR/$KMP_FILE.$KMP_FILE_EXT $DST_DIR/$KMP_UUID +kmpWas=$KMP_FILE.$KMP_FILE_EXT +kmpNow=${KMP_FILE}_`uuidgen`.$KMP_FILE_EXT +mv $DST_DIR/$kmpWas $DST_DIR/$kmpNow +# Rename references +sed -i '' 's|$kmpWas|$kmpNow|g' $DST_DIR/bank.html +sed -i '' 's|$kmpWas|$kmpNow|g' $DST_DIR/quiz.html -- 2.34.1 From f821f9017c5f4bfee30b6c63720f7633a7655213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:21:42 +0300 Subject: [PATCH 37/45] re --- publish.dbg | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/publish.dbg b/publish.dbg index e4371e9..fc8c9f5 100755 --- a/publish.dbg +++ b/publish.dbg @@ -36,6 +36,15 @@ cp -R dist/* $DST_DIR kmpWas=$KMP_FILE.$KMP_FILE_EXT kmpNow=${KMP_FILE}_`uuidgen`.$KMP_FILE_EXT mv $DST_DIR/$kmpWas $DST_DIR/$kmpNow + +# Replace text in a file +function replace { + file=$1 + was=$2 + now=$3 + cmd="sed -i '' 's|$was|$now|g' $file" + eval "$cmd" +} # Rename references -sed -i '' 's|$kmpWas|$kmpNow|g' $DST_DIR/bank.html -sed -i '' 's|$kmpWas|$kmpNow|g' $DST_DIR/quiz.html +replace $DST_DIR/bank.html "$kmpWas" "$kmpNow" +replace $DST_DIR/quiz.html "$kmpWas" "$kmpNow" -- 2.34.1 From ce89eb1ec54e571049aea01896f4ad2791bbb0d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:23:08 +0300 Subject: [PATCH 38/45] not mac version --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index fc8c9f5..81445df 100755 --- a/publish.dbg +++ b/publish.dbg @@ -42,7 +42,7 @@ function replace { file=$1 was=$2 now=$3 - cmd="sed -i '' 's|$was|$now|g' $file" + cmd="sed -i 's|$was|$now|g' $file" eval "$cmd" } # Rename references -- 2.34.1 From 5dbe2d61edf7c4e957eaf5930c53235cb5f354d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:23:45 +0300 Subject: [PATCH 39/45] wait --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index 81445df..fc8c9f5 100755 --- a/publish.dbg +++ b/publish.dbg @@ -42,7 +42,7 @@ function replace { file=$1 was=$2 now=$3 - cmd="sed -i 's|$was|$now|g' $file" + cmd="sed -i '' 's|$was|$now|g' $file" eval "$cmd" } # Rename references -- 2.34.1 From d8a57d7df704981f10e5405a22f1986947f84834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:25:00 +0300 Subject: [PATCH 40/45] print --- publish.dbg | 1 + 1 file changed, 1 insertion(+) diff --git a/publish.dbg b/publish.dbg index fc8c9f5..b68f351 100755 --- a/publish.dbg +++ b/publish.dbg @@ -43,6 +43,7 @@ function replace { was=$2 now=$3 cmd="sed -i '' 's|$was|$now|g' $file" + echo $cmd eval "$cmd" } # Rename references -- 2.34.1 From ec4bd51f7159ed55a94f1d028032398a3948b702 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:26:27 +0300 Subject: [PATCH 41/45] nix sed --- publish.dbg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index b68f351..4bcd839 100755 --- a/publish.dbg +++ b/publish.dbg @@ -42,7 +42,7 @@ function replace { file=$1 was=$2 now=$3 - cmd="sed -i '' 's|$was|$now|g' $file" + cmd="sed -i 's|$was|$now|g' $file" echo $cmd eval "$cmd" } -- 2.34.1 From e5cbba81c07af3fd762394f75dff2c8a73b1a039 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Tue, 11 Nov 2025 22:28:26 +0300 Subject: [PATCH 42/45] no print --- publish.dbg | 1 - 1 file changed, 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index 4bcd839..81445df 100755 --- a/publish.dbg +++ b/publish.dbg @@ -43,7 +43,6 @@ function replace { was=$2 now=$3 cmd="sed -i 's|$was|$now|g' $file" - echo $cmd eval "$cmd" } # Rename references -- 2.34.1 From 5c1892f0e437bc2cf61b0eb75d1c3fd420eff3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Wed, 12 Nov 2025 06:24:10 +0300 Subject: [PATCH 43/45] set max age to 12 hours --- nginx/cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/cfg b/nginx/cfg index 834b7c1..c065037 100644 --- a/nginx/cfg +++ b/nginx/cfg @@ -26,7 +26,6 @@ server { root /var/www/html; - # Add index.php to the list if you are using PHP index index.html; server_name _; @@ -36,6 +35,7 @@ server { # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; add_header "Access-Control-Allow-Origin" "*"; + add_header "Cache-Control" "max-age=43200"; # Remove CORS. if ($request_method = "OPTIONS") { add_header "Access-Control-Allow-Origin" "*"; -- 2.34.1 From dae7d431cfbad03e5ee1acead5a29f7544072fac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Wed, 12 Nov 2025 06:33:41 +0300 Subject: [PATCH 44/45] clarify --- publish.dbg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/publish.dbg b/publish.dbg index 81445df..06e9cb5 100755 --- a/publish.dbg +++ b/publish.dbg @@ -8,7 +8,7 @@ MAIN_BRANCH=main REPO_DIR=/home/kornerr/repo-ru REPO_URL=https://github.com/kornerr/ru -# Clone since the directory does not exist +# Clone if the directory does not exist if [ ! -d "$REPO_DIR" ]; then git clone $REPO_URL $REPO_DIR fi @@ -45,6 +45,7 @@ function replace { cmd="sed -i 's|$was|$now|g' $file" eval "$cmd" } + # Rename references replace $DST_DIR/bank.html "$kmpWas" "$kmpNow" replace $DST_DIR/quiz.html "$kmpWas" "$kmpNow" -- 2.34.1 From 86162c0d3ccd424a8952ad971b17d30f3678878d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Wed, 12 Nov 2025 06:35:35 +0300 Subject: [PATCH 45/45] clariy --- publish.dbg | 1 - publish.prod | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/publish.dbg b/publish.dbg index 06e9cb5..4a3d5ae 100755 --- a/publish.dbg +++ b/publish.dbg @@ -1,5 +1,4 @@ #!/bin/bash -SDIR=$(cd "$(dirname "$0")" ; pwd -P) DST_DIR=/var/www/dbg KMP_FILE=kornerr-ver-browser diff --git a/publish.prod b/publish.prod index 458cc8f..ec07515 100755 --- a/publish.prod +++ b/publish.prod @@ -1,10 +1,9 @@ #!/bin/bash -SDIR=$(cd "$(dirname "$0")" ; pwd -P) DBG_DIR=/var/www/dbg DST_DIR=/var/www/html -# Remove prod +# Remove current prod rm -fR $DST_DIR # Copy dbg to prod -- 2.34.1