Change how we get git info
This commit is contained in:
11
.build.yml
11
.build.yml
@@ -26,9 +26,9 @@ tasks:
|
|||||||
npx cspell "content/**/*.md"
|
npx cspell "content/**/*.md"
|
||||||
- rss: |
|
- rss: |
|
||||||
curl -s https://raw.githubusercontent.com/gohugoio/hugo/refs/tags/v$HUGO_VERSION/tpl/tplimpl/embedded/templates/_default/rss.xml \
|
curl -s https://raw.githubusercontent.com/gohugoio/hugo/refs/tags/v$HUGO_VERSION/tpl/tplimpl/embedded/templates/_default/rss.xml \
|
||||||
| diff - ./themes/v2/layouts/_default/rss.xml \
|
| diff - ./themes/v2/layouts/_default/rss.xml \
|
||||||
| wc -l \
|
| wc -l \
|
||||||
| grep 7
|
| grep 7
|
||||||
- dither: |
|
- dither: |
|
||||||
cd bin/dither
|
cd bin/dither
|
||||||
sudo bundle install
|
sudo bundle install
|
||||||
@@ -36,8 +36,9 @@ tasks:
|
|||||||
KEY=~/secret.key \
|
KEY=~/secret.key \
|
||||||
bundle exec rackup -p 4567 -D
|
bundle exec rackup -p 4567 -D
|
||||||
- hugo: |
|
- hugo: |
|
||||||
source bin/get-last-commit.sh
|
HUGO_PARAMS_GIT_COMMIT=$(git rev-parse HEAD) \
|
||||||
DITHER_SERVER=http://localhost:4567 hugo --minify
|
DITHER_SERVER=http://localhost:4567 \
|
||||||
|
hugo --minify
|
||||||
find public -name "*.enc" -type f -delete
|
find public -name "*.enc" -type f -delete
|
||||||
- deploy: |
|
- deploy: |
|
||||||
if [ "$(git rev-parse main)" != "$(git rev-parse HEAD)" ]; then \
|
if [ "$(git rev-parse main)" != "$(git rev-parse HEAD)" ]; then \
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
export HUGOxPARAMSxGITxLAST_COMMITxAUTHORNAME=$(git log -1 --format=%an)
|
|
||||||
export HUGOxPARAMSxGITxLAST_COMMITxDATE=$(git log -1 --format=%cI)
|
|
||||||
export HUGOxPARAMSxGITxLAST_COMMITxHASH=$(git log -1 --format=%H)
|
|
||||||
export HUGOxPARAMSxGITxLAST_COMMITxSUBJECT=$(git log -1 --format=%s)
|
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
<div class="mobile-hidden">
|
<div class="mobile-hidden">
|
||||||
Rendered {{ now | dateFormat "2006-01-02 15:04:05 MST" }}
|
Rendered {{ now | dateFormat "2006-01-02 15:04:05 MST" }}
|
||||||
{{ with site.Params.git.last_commit }}
|
{{ with site.Params.git.commit }}
|
||||||
• <a href="https://git.sr.ht/~dce/davideisinger.com/commit/{{ .hash }}">{{ substr .hash 0 7}}</a>
|
• <a href="https://git.sr.ht/~dce/davideisinger.com/commit/{{ . }}">{{ substr . 0 7}}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user