Open EugenMayer opened 3 years ago
I can compile the app (as usual) locally without issues. After switching to to an azure pipeline, i compile the up under golang:1.15-buster
golang:1.15-buster
I do install statik using
cd /tmp go get github.com/rakyll/statik
Then i call statik as expected
cd /src ${GOPATH}/bin/statik -f -src=./public
And this properly generates the build under ../statik/statik.go in my src folder
../statik/statik.go
Without any issues. But when i call go build (from the same cwd)
go build
cd /src env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags netgo -ldflags "-X github.com/<redacted>/build.Version=${{ variables.version }}" -o dist/<redacted> <redacted>_static.go
It errors with
statik/statik.go:6:2: cannot find package "." in: /__w/1/s/vendor/github.com/rakyll/statik/fs
I tried quiet some pieces but yet nothing worked.
My <redacted>_statik.go looks like
<redacted>_statik.go
import ( "flag" "github.com/<redacted>/bootstrap" "net/http" // will be generated by statik _ "github.com/<redacted>/statik" "github.com/rakyll/statik/fs" "log" ) func main() {...}
Helpful for any clues!
I can compile the app (as usual) locally without issues. After switching to to an azure pipeline, i compile the up under
golang:1.15-buster
I do install statik using
Then i call statik as expected
And this properly generates the build under
../statik/statik.go
in my src folderWithout any issues. But when i call
go build
(from the same cwd)It errors with
I tried quiet some pieces but yet nothing worked.
My
<redacted>_statik.go
looks likeHelpful for any clues!