util/update_public_suffix_list.sh: use commit date, not wall clock
This is both more accurate and also more stable: The suffix-list update usually takes several days to go through all branches; using the commit date avoids using newer fetch dates in older branches. Pick-to: 6.9 6.8 6.5 6.2 5.15 Change-Id: Ifefd7158e4104c7bbdfe6a2d8a505d8acf7275b4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
2230f51590
commit
cbea57f80b
@ -54,14 +54,14 @@ check_or_die output -w "$PSL_DATA_CPP"
|
|||||||
check_or_die binary-output -w "$PUBLIC_SUFFIX_LIST_DAFSA"
|
check_or_die binary-output -w "$PUBLIC_SUFFIX_LIST_DAFSA"
|
||||||
|
|
||||||
GITSHA1=$(cd "$PUBLIC_SUFFIX_LIST_DAT_DIR" && git log -1 --format=format:%H)
|
GITSHA1=$(cd "$PUBLIC_SUFFIX_LIST_DAT_DIR" && git log -1 --format=format:%H)
|
||||||
TODAY=$(date +%Y-%m-%d)
|
GITDATE=$(cd "$PUBLIC_SUFFIX_LIST_DAT_DIR" && git log -1 --format=format:%cs)
|
||||||
msg "Using $INPUT @ $GITSHA1, fetched on $TODAY"
|
msg "Using $INPUT @ $GITSHA1, fetched on $GITDATE"
|
||||||
|
|
||||||
run_or_die "$MAKE_DAFSA" "$INPUT" "$PSL_DATA_CPP"
|
run_or_die "$MAKE_DAFSA" "$INPUT" "$PSL_DATA_CPP"
|
||||||
run_or_die "$MAKE_DAFSA" --output-format=binary "$INPUT" "$PUBLIC_SUFFIX_LIST_DAFSA"
|
run_or_die "$MAKE_DAFSA" --output-format=binary "$INPUT" "$PUBLIC_SUFFIX_LIST_DAFSA"
|
||||||
|
|
||||||
# update the first Version line in qt_attribution.json with the new SHA1 and date:
|
# update the first Version line in qt_attribution.json with the new SHA1 and date:
|
||||||
run_or_die sed -i -e "1,/\"Version\":/{ /\"Version\":/ { s/[0-9a-fA-F]\{40\}/$GITSHA1/; s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/$TODAY/ } }" "$ATTRIBUTION_JSON"
|
run_or_die sed -i -e "1,/\"Version\":/{ /\"Version\":/ { s/[0-9a-fA-F]\{40\}/$GITSHA1/; s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/$GITDATE/ } }" "$ATTRIBUTION_JSON"
|
||||||
|
|
||||||
# update the first "PURL" line with the new SHA1:
|
# update the first "PURL" line with the new SHA1:
|
||||||
run_or_die sed -i -e "1,/\"PURL\":/{ /\"PURL\":/ { s/[0-9a-fA-F]\{40\}/$GITSHA1/; } }" "$ATTRIBUTION_JSON"
|
run_or_die sed -i -e "1,/\"PURL\":/{ /\"PURL\":/ { s/[0-9a-fA-F]\{40\}/$GITSHA1/; } }" "$ATTRIBUTION_JSON"
|
||||||
@ -73,7 +73,7 @@ run_or_die git add "$ATTRIBUTION_JSON"
|
|||||||
run_or_die git commit -m "Update public suffix list
|
run_or_die git commit -m "Update public suffix list
|
||||||
|
|
||||||
Version $GITSHA1, fetched on
|
Version $GITSHA1, fetched on
|
||||||
$TODAY.
|
$GITDATE.
|
||||||
|
|
||||||
[ChangeLog][Third-Party Code] Updated the public suffix list to upstream
|
[ChangeLog][Third-Party Code] Updated the public suffix list to upstream
|
||||||
SHA $GITSHA1.
|
SHA $GITSHA1.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user