]> Cypherpunks.ru repositories - goredo.git/commitdiff
Use vendoring, instead of GOPATH directories preparation v0.12.1
authorSergey Matveev <stargrave@stargrave.org>
Wed, 13 Jan 2021 11:34:44 +0000 (14:34 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Wed, 13 Jan 2021 13:03:29 +0000 (16:03 +0300)
.gitignore
doc/.gitignore [new file with mode: 0644]
doc/install.texi
doc/news.texi
makedist.sh
module-name.do [deleted file]
usage.go

index 28fac2672a84f7863f763964479cc08516a35c4f..832c8d55d6755bc29bdc3b00929f0ff6f0c931ff 100644 (file)
@@ -1,6 +1,4 @@
 /goredo
-/goredo.info
-/module-name
 /redo
 /redo-always
 /redo-cleanup
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644 (file)
index 0000000..859c00b
--- /dev/null
@@ -0,0 +1 @@
+/goredo.info
index 34688d9993aeecbd4e44174a11dffc55fbfe6d02..4b4117f0ab23c688d7009f93f50cc852128967e5 100644 (file)
@@ -13,8 +13,8 @@ $ [fetch|wget] http://www.goredo.cypherpunks.ru/download/goredo-@value{VERSION}.
 $ [fetch|wget] http://www.goredo.cypherpunks.ru/download/goredo-@value{VERSION}.tar.zst.sig
 $ gpg --verify goredo-@value{VERSION}.tar.zst.sig goredo-@value{VERSION}.tar.zst
 $ zstd -d < goredo-@value{VERSION}.tar.zst | tar xf -
-$ cd goredo-@value{VERSION}
-$ GOPATH=`pwd` go build go.cypherpunks.ru/goredo
+$ cd goredo-@value{VERSION}/src
+$ go build -mod=vendor
 $ ./goredo -symlinks        # create redo-* commands symlinks
 $ export PATH=`pwd`:$PATH   # let your system know about goredo
 @end example
index 8955eabef8abc3d33e5bb9706c1fb0f7e63df960..0f54ab9dadfc46c8c4aca20cb14df0912bab789b 100644 (file)
@@ -1,6 +1,15 @@
 @node News
 @unnumbered News
 
+@anchor{Release 0.12.1}
+@section Release 0.12.1
+@itemize
+@item
+    Tarball uses @file{vendor} directory without @env{GOPATH}
+    overriding. @command{goredo} and its dependencies anyway uses Go
+    1.12+ versions, that have @file{vendor}-ing support.
+@end itemize
+
 @anchor{Release 0.12.0}
 @section Release 0.12.0
 @itemize
index ac2b83738135e6381b6c189e9f4e706cc5d13fe4..4eef737eabb067f709953a6084a41e1f8cc39547 100755 (executable)
@@ -9,8 +9,7 @@ git clone . $tmp/goredo-$release
 cd $tmp/goredo-$release
 git checkout v$release
 
-redo-ifchange module-name VERSION
-mod_name=`cat module-name`
+redo-ifchange VERSION
 
 ########################################################################
 cd doc
@@ -65,54 +64,19 @@ cd ..
 
 ########################################################################
 
-mkdir -p src/$mod_name
-mv *.go go.* src/$mod_name
-
-mods="
-go.cypherpunks.ru/recfile
-go.cypherpunks.ru/tai64n
-golang.org/x/sys
-golang.org/x/term
-lukechampine.com/blake3
-"
-
-for mod in $mods; do
-    mod_path=$(sed -n "s# // indirect## ; s#^  \($mod\) \(.*\)\$#\1@\2#p" src/$mod_name/go.mod)
-    [ -n "$mod_path" ]
-    mkdir -p src/$mod
-    ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
-    chmod -R +w src/$mod
-done
-
-for mod in github.com/klauspost/cpuid; do
-    mod_path=$(sed -n "s#^\($mod\) \(.*\) h1:.*\$#\1@\2#p" src/$mod_name/go.sum | sed /go.mod/d | sort -n -r | sed -n 1p)
-    [ -n "$mod_path" ]
-    mkdir -p src/$mod
-    ( cd $GOPATH/pkg/mod/$mod_path ; tar cf - --exclude ".git*" * ) | tar xfC - src/$mod
-    chmod -R +w src/$mod
-done
-
-cat > $tmp/includes <<EOF
-golang.org/x/sys/AUTHORS
-golang.org/x/sys/CONTRIBUTORS
-golang.org/x/sys/go.mod
-golang.org/x/sys/internal/unsafeheader
-golang.org/x/sys/LICENSE
-golang.org/x/sys/PATENTS
-golang.org/x/sys/README.md
-golang.org/x/sys/unix
-golang.org/x/term
-EOF
-tar cfCI - src $tmp/includes | tar xfC - $tmp
-rm -fr src/golang.org $tmp/includes
-mv $tmp/golang.org src
-
-rm -r src/golang.org/x/sys/unix/linux
-rm -r src/github.com/klauspost/cpuid/private src/github.com/klauspost/cpuid/testdata
+mkdir -p src
+mv *.go go.* src
+cd src
+go mod vendor
+modvendor -v -copy="**/*_test.go **/private-gen.go **/main.go **/vectors.json **/gen.go"
+rm -rf vendor/golang.org/x/sys/plan9 vendor/golang.org/x/sys/windows
+find vendor/golang.org/x/sys -name "*_test.go" -delete
+find . \( -name .gitignore -o -name .travis.yml \) -delete
+cd ..
 
 ########################################################################
 
-rm -rf *.texi .redo .git .gitignore doc makedist.sh module-name* VERSION.do
+rm -rf *.texi .redo .git .gitignore doc makedist.sh VERSION.do
 find . -type d -exec chmod 755 {} \;
 find . -type f -exec chmod 644 {} \;
 
diff --git a/module-name.do b/module-name.do
deleted file mode 100644 (file)
index 8284690..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-redo-ifchange go.mod
-sed -n 's/^module //p' < go.mod
index cbbb672702adebf54997499c15800d21c4ae128c..50971596eb564281b497b2d320db257f86e6b7d4 100644 (file)
--- a/usage.go
+++ b/usage.go
@@ -26,7 +26,7 @@ import (
 )
 
 const (
-       Version  = "0.12.0"
+       Version  = "0.12.1"
        Warranty = `This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, version 3 of the License.