-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: make it even more reproducible
* Makefile.am (today): Consistently print the UTC date in C locale. * configure.ac (RPM_CHANGELOGTIME, DEB_CHANGELOGTIME): Likewise. * maint/update_copyright_years.sh: Likewise. * copyright-year-gen: Likewise. When $SOURCE_DATE_EPOCH is non-empty, use it as fallback date before the current system date. References: #68
- Loading branch information
Showing
4 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
: ${YEAR_FILE:=$1} | ||
: ${DEFAULT_YEAR:=$2} | ||
LC_TIME=C; export LC_TIME | ||
|
||
year= | ||
|
||
|
@@ -13,11 +14,17 @@ year= | |
[ -f "${YEAR_FILE}" ] && year="$(cat "${YEAR_FILE}")" | ||
|
||
[ -n "${year}" ] || | ||
year="$(date +%Y -d "$(git show --format=format:%cD --no-patch)")" | ||
year="$(date -u +%Y -d "$(git show --format=format:%cD --no-patch)")" | ||
|
||
[ -n "${year}" ] || year="${DEFAULT_YEAR}" | ||
[ -n "${year}" ] || | ||
year="${DEFAULT_YEAR}" | ||
|
||
[ -n "${year}" ] || | ||
[ -z "${SOURCE_DATE_EPOCH-}" ] || | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ldv-alt
Author
Member
|
||
year="$(date -u +%Y -d "@${SOURCE_DATE_EPOCH}")" | ||
|
||
[ -n "${year}" ] || year="$(date "+%Y")" | ||
[ -n "${year}" ] || | ||
year="$(date -u +%Y)" | ||
|
||
[ -n "${year}" ] || { | ||
echo >&2 'Undefined year.' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Did you mean: