Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GO: Be able to build from sub directory #21

Open
clarsonneur opened this issue Sep 7, 2018 · 1 comment
Open

GO: Be able to build from sub directory #21

clarsonneur opened this issue Sep 7, 2018 · 1 comment

Comments

@clarsonneur
Copy link
Contributor

Module : GO

After build_env script executed, the build environment gets loaded, and go and glide became available.

When you are in project root, go start docker from the project root.
But if we move to a subdirectory, docker stay in the same working directory. But sometimes, we just need a simple module build and not all the application build.

Ex:
Following looks good:

[/home/larsonsh/src/forj/src/forjj] $ go build
++ sudo docker run --rm -i -t -v /home/me/src/forj/:/go -w /go/src/forjj -u 10001 forjj-go-env /usr/local/go/bin/go-static build -ldflags '-X main.build_branch=workspace-mgt -X main.build_commit=6ac25087d1fc45d4662d082943068129e4712f55 -X main.build_date=2018-09-06_22:18:07_+0200 -X main.build_tag=false'

Following do not looks good:

[/home/larsonsh/src/forj/src/forjj/workspace] $ go build
++ sudo docker run --rm -i -t -v /home/me/src/forj/:/go -w /go/src/forjj -u 10001 forjj-go-env /usr/local/go/bin/go-static build -ldflags '-X main.build_branch=workspace-mgt -X main.build_commit=6ac25087d1fc45d4662d082943068129e4712f55 -X main.build_date=2018-09-06_22:18:07_+0200 -X main.build_tag=false'

This last sentence build from the project root and not from project root/workspace

Requires to build only the sub-directory.

@clarsonneur
Copy link
Contributor Author

With go, we could build like go build forjj_modules/cli. Do considering this use case differently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant