From 6e4bef517998f0638f3ceda16f83f55bf3265183 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Sat, 12 Oct 2024 12:32:11 +0200 Subject: [PATCH] add commit info to site --- deploy.sh | 2 ++ package.json | 2 +- src/index.html | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 35a63ed..12590a0 100644 --- a/deploy.sh +++ b/deploy.sh @@ -1,6 +1,8 @@ #!/bin/bash cp geofeed.csv dist +find dist -type f -exec sed -i 's/var_lastmod/$(date)/g' {} + +find dist -type f -exec sed -i 's/var_commithash/$(git rev-parse --short HEAD)/g' {} + ncftpput -R -u $FTP_USER -p $FTP_PASSWORD $FTP_SERVER . dist/* diff --git a/package.json b/package.json index 7bddbbc..67f5ebd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "scripts": { - "start": "parcel src/index.html src/**/index.html", + "start": "BUILD_DATE=$(date) parcel src/index.html src/**/index.html", "build": "parcel build src/index.html src/**/index.html" }, "devDependencies": { diff --git a/src/index.html b/src/index.html index 16428d1..c0573fc 100644 --- a/src/index.html +++ b/src/index.html @@ -43,5 +43,7 @@
  • Services
  • Source code
  • + +

    Last modified: var_lastmod var_commithash

    \ No newline at end of file