Move the main package to cmd/elvish.

Now that the module path is "src.elv.sh", doing a "go get" will install the
Elvish binary as "src.elv.sh"; this is not what we want, so move the main
package into a package called "elvish".

Also update "go get" and "go build" commands accordingly.
This commit is contained in:
Qi Xiao 2021-01-27 01:35:01 +00:00
parent 196eea21d4
commit 22e4315eb1
4 changed files with 3 additions and 3 deletions

View File

@ -3,7 +3,7 @@ default: test get
get:
go get -trimpath -ldflags \
"-X src.elv.sh/pkg/buildinfo.Version=$$(git describe --tags --always --dirty=-dirty) \
-X src.elv.sh/pkg/buildinfo.Reproducible=true" .
-X src.elv.sh/pkg/buildinfo.Reproducible=true" ./cmd/elvish
# Used by elves/up
buildall:

View File

@ -53,7 +53,7 @@ This will install Elvish to `~/go/bin`.
Alternatively, you can also just use `go get` to install Elvish:
```sh
go get -u src.elv.sh
go get -u src.elv.sh/cmd/elvish
```
This will clone the Git repository to `~/go/src/src.elv.sh`, updating it if

View File

@ -39,7 +39,7 @@ buildone() {
echo -n "Building for $GOOS-$GOARCH... "
go build -o $DST_DIR/$BIN -trimpath -ldflags \
"-X src.elv.sh/pkg/buildinfo.Version=$VERSION \
-X src.elv.sh/pkg/buildinfo.Reproducible=true" || {
-X src.elv.sh/pkg/buildinfo.Reproducible=true" ./cmd/elvish || {
echo "Failed"
return
}