Skip to content

Commit ed7e2e1

Browse files
committed
psl: shorten ISO timestamp to the ISO date [ci skip]
The full timestamp is overkill and feels distracting: https://curl.se/windows The hash still defines the exact commit, and mutiple updates aren't likely within a single day, even if it happens. It'd still work if it happened, but wouldn't be autodetected and wouldn't be reflected in the version number. This seems fine.
1 parent 7a22314 commit ed7e2e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

_dl.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ check_update() {
251251
slug="${BASH_REMATCH[1]}"
252252
jcommit="$(my_curl --user-agent ' ' "https://api.github.com/repos/${slug}/commits" \
253253
--header 'X-GitHub-Api-Version: 2022-11-28')"
254-
newver="$(echo "${jcommit}" | jq --raw-output '.[0].commit.committer.date')"
254+
newver="$(echo "${jcommit}" | jq --raw-output '.[0].commit.committer.date' | cut -c -10)" # YYYY-MM-DDThh:mm:ssZ -> YYYY-MM-DD
255255
hash="$(echo "${jcommit}" | jq --raw-output '.[0].sha')"
256256
elif [[ "${url}" =~ ^https://github.com/([a-zA-Z0-9-]+/[a-zA-Z0-9-]+)/ ]]; then
257257
slug="${BASH_REMATCH[1]}"
@@ -323,11 +323,11 @@ check_update() {
323323
fi
324324
fi
325325
if [ -n "${newver}" ]; then
326-
if [[ "${newver}" = *'T'*'Z' ]]; then # ISO timestamp
326+
if [[ "${url}" =~ ^https://raw.githubusercontent.com/ ]]; then
327327
case "$(uname)" in
328328
Darwin*|*BSD)
329-
unixold="$(date -u -j -f '%Y-%m-%dT%H:%M:%SZ' "${ourvern}" '+%s')"
330-
unixnew="$(date -u -j -f '%Y-%m-%dT%H:%M:%SZ' "${newver}" '+%s')"
329+
unixold="$(date -u -j -f '%Y-%m-%d' "${ourvern}" '+%s')"
330+
unixnew="$(date -u -j -f '%Y-%m-%d' "${newver}" '+%s')"
331331
;;
332332
*) # GNU date
333333
unixold="$(date -d "${ourvern}" '+%s')"

_versions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export TRURL_HASH=aac947d4fb421a58abc19a3771e87942cd4721b8f855c433478c94c11a8203
2020

2121
export CACERT_VER_='2025-09-09'
2222
export CACERT_HASH=f290e6acaf904a4121424ca3ebdd70652780707e28e8af999221786b86bb1975
23-
export PSL_VER_='2025-10-16T17:43:24Z'
23+
export PSL_VER_='2025-10-16'
2424
export PSL_HASH=399792921792cacc483219997697443b49b6976f
2525
export BROTLI_VER_='1.1.0'
2626
export BROTLI_HASH=e720a6ca29428b803f4ad165371771f5398faba397edf6778837a18599ea13ff

0 commit comments

Comments
 (0)