Skip to content

Unable to set local path to build from Fork #28

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

Closed
mjkapkan opened this issue Aug 24, 2021 · 6 comments
Closed

Unable to set local path to build from Fork #28

mjkapkan opened this issue Aug 24, 2021 · 6 comments

Comments

@mjkapkan
Copy link

Hi,

I need to build from source of a specific branch. So I pulled to branch and tried to build it, but it looks like the path is not accepted:

$ XK6_K6_REPO="$PWD" xk6 build

2021/08/24 11:52:11 [INFO] Temporary folder: /tmp/buildenv_2021-08-24-1152.237197142

2021/08/24 11:52:11 [INFO] Writing main module: /tmp/buildenv_2021-08-24-1152.237197142/main.go

2021/08/24 11:52:11 [INFO] Initializing Go module

2021/08/24 11:52:11 [INFO] exec (timeout=10s): /home/jaunius/.gvm/gos/go1.16.6/bin/go mod init k6 

go: creating new go.mod: module k6

go: to add module requirements and sums:

	go mod tidy

2021/08/24 11:52:11 [INFO] Pinning versions

2021/08/24 11:52:11 [INFO] exec (timeout=0s): /home/jaunius/.gvm/gos/go1.16.6/bin/go mod edit -require go.k6.io/k6@latest 

2021/08/24 11:52:11 [INFO] exec (timeout=10s): /home/jaunius/.gvm/gos/go1.16.6/bin/go mod edit -replace 
go.k6.io/k6=/home/jaunius/dev/builds/xk6/k6 

go: errors parsing go.mod:

/tmp/buildenv_2021-08-24-1152.237197142/go.mod:5: require go.k6.io/k6: version "latest" invalid: must be of the form v1.2.3

2021/08/24 11:52:11 [INFO] Cleaning up temporary folder: /tmp/buildenv_2021-08-24-1152.237197142

2021/08/24 11:52:11 [FATAL] exit status 1
@mstoykov
Copy link
Contributor

can you please try to run go install go.k6.io/xk6/cmd/xk6@latest and try again?

@mjkapkan
Copy link
Author

mjkapkan commented Aug 24, 2021

Thanks! That worked. Looks like I might have missed one step. Is there any way to build directly from repository fork instead of pulling it first locally?

@mstoykov
Copy link
Contributor

We had a bug last week you like didn't upgrade since then :).

Is there any way to build directly from repository fork instead of pulling it first locally?

Are you talking about a k6 fork or an extension fork ... I think in both case you can just give the fork "url" instead.

@mjkapkan
Copy link
Author

Apologies for the confusion, what I meant is a specific branch. Like this:
--branch feature/SourceMaps https://github.com/grafana/k6.git

@mstoykov
Copy link
Contributor

mstoykov commented Aug 25, 2021

You can use env variables as in K6_VERSION=whatever xk6 build ... but it doesn't work with branches with / in them, but it works with commit has so K6_VERSION=1065bcf xk6 build ... works .

p.s. please also update to v0.4.5

@imiric
Copy link
Contributor

imiric commented Sep 6, 2021

Closing this as it appears to be fixed, but let us know if not @mjkapkan.

@imiric imiric closed this as completed Sep 6, 2021
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

3 participants