[Git][reproducible-builds/reproducible-website][master] Move SDE 'git log' example to 'setting the variable'

Arnout Engelen gitlab at salsa.debian.org
Fri Jun 26 08:01:35 UTC 2020



Arnout Engelen pushed to branch master at Reproducible Builds / reproducible-website


Commits:
0cd75fe9 by Arnout Engelen at 2020-06-26T10:00:50+02:00
Move SDE 'git log' example to 'setting the variable'

- - - - -


1 changed file:

- _docs/source-date-epoch.md


Changes:

=====================================
_docs/source-date-epoch.md
=====================================
@@ -20,6 +20,8 @@ Below we also have more detailed discussion about this specific variable, as wel
 
 ## Setting the variable
 
+### Debian
+
 In Debian, this is automatically set to the same time as the latest entry in `debian/changelog`, i.e. the same as the output of `dpkg-parsechangelog -SDate`.
 
  1. For packages using debhelper, versions >= 9.20151004 (Bug:791823) exports this variable during builds, so you probably don't need to change anything. One exception is if your `debian/rules` needs this variable in non-debhelper parts, in which case you can try (3) or (4).
@@ -48,6 +50,14 @@ In Debian, this is automatically set to the same time as the latest entry in `de
 
  This snippet is believed to work on dpkg versions as far back as 2003.
 
+### git
+
+To set SOURCE_DATE_EPOCH to the last modification of a git repository you can use 'git log', for example in shell:
+
+```
+SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
+```
+
 ## Reading the variable
 
 We are persuading upstream tools to support this directly. You may help by writing patches for these tools; please add links to the bug reports here so we know, and to act as an example resource for future patch writers.
@@ -282,14 +292,6 @@ if source_date_epoch == "" {
 }
 ```
 
-### git repository
-
-to set SOURCE_DATE_EPOCH to the last modification of a git repository, in shell:
-
-```
-SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
-```
-
 ### PHP
 
 ```



View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/0cd75fe985db17cf6071219c10ee991edb920b84

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/reproducible-website/-/commit/0cd75fe985db17cf6071219c10ee991edb920b84
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20200626/9bb191ec/attachment.htm>


More information about the rb-commits mailing list