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 @@
Last modified: var_lastmod var_commithash