.gitignore | 1 + gocheese.do | 4 ++-- makedist.sh | 12 ++++++++---- module-name.do | 2 ++ test.do | 3 ++- diff --git a/.gitignore b/.gitignore index b99e5ab083400e7ee339fba4a09471a5a17f61554a8823656ffb3ce6de8d2291..25cd6fa311827fa8a9b71147d11a95242aa6452e684d9da97086cf2d34715811 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ gocheese gocheese.info gocheese.html +module-name diff --git a/gocheese.do b/gocheese.do index 0140133de8043b6e9dac86d6357d58ef29e77894626aa9e1f0db7fa21252bb11..07666b9b4df996a5caab2242127ede00570e83b38164a962e98b6e53b20ca4fe 100644 --- a/gocheese.do +++ b/gocheese.do @@ -1,2 +1,2 @@ -redo-ifchange *.go -${GO:=go} build -o $3 -ldflags "-X main.Version=`cat VERSION`" go.cypherpunks.ru/gocheese/v2 +redo-ifchange *.go module-name +${GO:=go} build -o $3 -ldflags "-X main.Version=`cat VERSION`" `cat module-name` diff --git a/makedist.sh b/makedist.sh index a73c76c30922ca3501cd26247215fafcc3c996b0c50c5416eb40504360dcea89..d5bcd596be42630186d3305c6c77f157d90ec3675e3fbaf6ec3dc8ee5ea49955 100755 --- a/makedist.sh +++ b/makedist.sh @@ -4,12 +4,14 @@ cur=$(pwd) tmp=$(mktemp -d) release=$1 [ -n "$release" ] +MAKEINFO=${MAKEINFO:=makeinfo} git clone . $tmp/gocheese-$release cd $tmp/gocheese-$release git checkout v$release -mod_name=$(sed -n 's/^module //p' go.mod) +redo-ifchange module-name +mod_name=`cat module-name` crypto_mod_path=$(sed -n 's#^require \(golang.org/x/crypto\) \(.*\)$#\1@\2#p' go.mod) mkdir -p src/$mod_name mv *.go go.mod go.sum src/$mod_name @@ -68,7 +70,7 @@ cat > download.texi < $texi < gocheese.do +echo 'GOPATH=`pwd` ${GO:=go} test `cat module-name`/... >&2' > test.do find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; diff --git a/module-name.do b/module-name.do new file mode 100644 index 0000000000000000000000000000000000000000..7dc38a7139221ff5716b1c8f70c21c5cfb8e0e83077595947d5c1be0ba17642a --- /dev/null +++ b/module-name.do @@ -0,0 +1,2 @@ +redo-ifchange go.mod +sed -n 's/^module //p' < go.mod diff --git a/test.do b/test.do index 775ae4c0f4467a06f46fdceafa057413270ce8b373533583e8bfba55069fcb8f..1cc4f616cbf63601c701e70b56d5b743ab733762642fa350f1eed26bcdb817cb 100644 --- a/test.do +++ b/test.do @@ -1 +1,2 @@ -${GO:=go} test go.cypherpunks.ru/gocheese/v2/... >&2 +redo-ifchange module-name +${GO:=go} test `cat module-name`/... >&2