José
José
TTask
Created by José on 5/29/2024 in #help
commands composition?
Hi! I need to build my go program but i have some options. First: - GOOS=linux GOARCH=arm64 - Native. Second: - Use X or Y implementation of a specific thing. Third: - If Y was chosen, three alternatives for a ldflag (let's call them: 'a', 'b', setted by the user as a var on the task call) so, y commands could look like:
1. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use X'"
2. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use Y' -X 'value is a'"
3. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use Y' -X 'value is b'"
4. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use Y' -X 'value is what the user gave you'"
5. go build -ldflags "-X 'use X'"
6. go build -ldflags "-X 'use Y' -X 'value is a'"
7. go build -ldflags "-X 'use Y' -X 'value is b'"
8. go build -ldflags "-X 'use Y' -X 'value is what the user gave you'"
1. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use X'"
2. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use Y' -X 'value is a'"
3. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use Y' -X 'value is b'"
4. GOOS=linux GOARCH=arm64 go build -ldflags "-X 'use Y' -X 'value is what the user gave you'"
5. go build -ldflags "-X 'use X'"
6. go build -ldflags "-X 'use Y' -X 'value is a'"
7. go build -ldflags "-X 'use Y' -X 'value is b'"
8. go build -ldflags "-X 'use Y' -X 'value is what the user gave you'"
I'd like to call my tasks something like:
task linux x build
task linux y a build
task linux y b build
VALUE=c task linux y build
task x build
task y a build
task y b build
VALUE=c task y build
task linux x build
task linux y a build
task linux y b build
VALUE=c task linux y build
task x build
task y a build
task y b build
VALUE=c task y build
is there a way to do that?
3 replies