On Fri, Dec 03, 2021 at 12:18:27AM +0200, Nir Soffer wrote:
Go fail to parse the short date format (2021-11-30) from the @latest and .info file. Replace with %cI - strict ISO 8601 format.
Signed-off-by: Nir Soffer <nsoffer@redhat.com> --- golang/make-dist.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/golang/make-dist.sh b/golang/make-dist.sh index 86785e5d..c658f928 100755 --- a/golang/make-dist.sh +++ b/golang/make-dist.sh @@ -94,38 +94,40 @@ rm -rf libguestfs.org # └── v1.11.4.zip # # We create @latest and @v/*{.info,mod,zip} here. # # The "@v/list" file must be created on the web server after uploading # a new release: # # $ cd libguestfs.org/libnbd/@v # $ ls -1 v*.info | awk -F.info '{print $1}' > list # $ cat list # v1.11.3 # v1.11.4 # # See https://golang.org/ref/mod#serving-from-proxy
module_dir=libguestfs.org/libnbd v_dir=$module_dir/@v
mkdir -p $v_dir
+# Go wants a string in RFC 3339, git strict ISO 8601 format is +# compatible. info="{ \"Version\": \"$version\", - \"Time\": \"$(git show -s --format=%cs)\" + \"Time\": \"$(git show -s --format=%cI)\" }" echo "$info" > $module_dir/@latest echo "$info" > $v_dir/$version.info
cp go.mod $v_dir/$version.mod mv $version.zip $v_dir
# Create tarball to upload and extract on the webserver. It should be # extracted in the directory pointed by the "go-import" meta tag. output=$PWD/libnbd-golang-$version.tar.gz tar czf $output libguestfs.org
rm -rf libguestfs.org
echo output written to $output
This looks OK, ACK. The other problem was the list file not containing all versions. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-p2v converts physical machines to virtual machines. Boot with a live CD or over the network (PXE) and turn machines into KVM guests. http://libguestfs.org/virt-v2v