ppkarwasz commented on code in PR #414:
URL: https://github.com/apache/logging-log4cxx/pull/414#discussion_r1799514373


##########
package.sh:
##########
@@ -0,0 +1,108 @@
+#!/bin/bash
+#
+set -e
+
+# Shorthand for digit class:
+d="[[:digit:]]"
+# Determine the version and build timestamp
+VERSION=$(sed -n -e "s/^set(log4cxx_VER \(.*\)\.$d\+)/\1/p" < 
src/cmake/projectVersionDetails.cmake)
+if ! echo "$VERSION" | grep -Eq "^$d+\.$d+\.$d+$"; then
+  echo Invalid version number: "$VERSION" >& 2
+  exit 1
+fi
+
+OUTPUT_TIMESTAMP=$(sed -n -e "s/^set(log4cxx_OUTPUT_TIMESTAMP 
\"\(.*\)\")/\1/p" < src/cmake/projectVersionDetails.cmake)

Review Comment:
   That would probably be the ideal solution.
   
   In Log4j we had a chicken-and-egg problem, because changing the timestamp 
for the JAR files requires the modification of the [Maven 
`project.build.outputTimestamp`](https://maven.apache.org/guides/mini/guide-reproducible-builds.html)
 property, which requires a commit, which modifies the timestamp, etc. :wink:
   
   We could however solve the problem by overriding the `COMMIT_DATE` of the 
commit that just modifies `project.build.outputTimestamp`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to