From: Sergey Matveev Date: Wed, 13 Jan 2021 11:34:44 +0000 (+0300) Subject: Use vendoring, instead of GOPATH directories preparation X-Git-Tag: v0.12.1^0 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=f941d7cb340205d0ef3ec333d56c37d4a3fa5e6f Use vendoring, instead of GOPATH directories preparation --- diff --git a/.gitignore b/.gitignore index 28fac26..832c8d5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 index 0000000..859c00b --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +/goredo.info diff --git a/doc/install.texi b/doc/install.texi index 34688d9..4b4117f 100644 --- a/doc/install.texi +++ b/doc/install.texi @@ -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 diff --git a/doc/news.texi b/doc/news.texi index 8955eab..0f54ab9 100644 --- a/doc/news.texi +++ b/doc/news.texi @@ -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 diff --git a/makedist.sh b/makedist.sh index ac2b837..4eef737 100755 --- a/makedist.sh +++ b/makedist.sh @@ -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 <