On Mon, Nov 08, 2021 at 07:59:38PM +0200, Nir Soffer wrote:
Add the optional Time key to the vx.y.z.info file. This should help
https://pkg.go.dev/libguestfs.org/libnbd to show the "Published" date.
Using the commit date so rebuilding the tarball will created identical
metadata.
$ cat
libguestfs.org/libnbd/@latest
{
"Version": "v1.11.3-9-g157bc49",
"Time": "2021-11-08"
}
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
v2 changes:
- Use git commit date for reproducible builds (Richard)
- Create indented json
golang/make-dist.sh | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/golang/make-dist.sh b/golang/make-dist.sh
index 1aef36c..32b9735 100755
--- a/golang/make-dist.sh
+++ b/golang/make-dist.sh
@@ -100,8 +100,12 @@ v_dir=$module_dir/@v
mkdir -p $v_dir
-echo "{\"Version\": \"$version\"}" >
$module_dir/@latest
-echo "{\"Version\": \"$version\"}" >
$v_dir/$version.info
+info="{
+ \"Version\": \"$version\",
+ \"Time\": \"$(git show -s --format=%cs)\"
+}"
+echo "$info" > $module_dir/@latest
+echo "$info" > $v_dir/$version.info
# This is not entirely correct. This file should have a list of all
# versions available, here we create only single version. This should
--
2.31.1
ACK thanks.
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW