Usar fechas de git en vez de los archivos
continuous-integration/woodpecker the build was successful
Details
continuous-integration/woodpecker the build was successful
Details
This commit is contained in:
parent
2065ea8e15
commit
c078106ea2
|
@ -2,7 +2,7 @@ pipeline:
|
||||||
build:
|
build:
|
||||||
image: docker.io/alpine:3.14
|
image: docker.io/alpine:3.14
|
||||||
commands:
|
commands:
|
||||||
- apk add cmark
|
- apk add cmark git
|
||||||
# Para generar las fechas bien
|
# Para generar las fechas bien
|
||||||
- ln -sf /etc/zoneinfo/America/Argentina/Buenos_Aires /etc/localtime
|
- ln -sf /etc/zoneinfo/America/Argentina/Buenos_Aires /etc/localtime
|
||||||
- ./build.sh
|
- ./build.sh
|
||||||
|
|
2
build.sh
2
build.sh
|
@ -12,7 +12,7 @@ template () {
|
||||||
if test -n "$2"; then
|
if test -n "$2"; then
|
||||||
echo -n "<header>"
|
echo -n "<header>"
|
||||||
echo -n "<h1>$1</h1>"
|
echo -n "<h1>$1</h1>"
|
||||||
echo -n "<p><small>Último cambio: <time datetime='$(stat -c %y "$2")'>$(date -d "$(stat -c %y "$2" | cut -f 1 -d .)" '+%Y-%m-%d %H:%M')</time></small></p>"
|
echo -n "<p><small>Último cambio: <time datetime='$(git log -1 --format=%ai "$2")'>$(date -d "@$(git log -1 --format=%at "$2")" '+%Y-%m-%d %H:%M')</time></small></p>"
|
||||||
echo -n "</header>"
|
echo -n "</header>"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue