Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beaver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
orus-io
beaver
Commits
e9b798eb8ea5
Commit
e9b798eb8ea5
authored
2 years ago
by
nhi.tran
Browse files
Options
Downloads
Patches
Plain Diff
Multi platform build
parent
f49194956353
No related branches found
No related tags found
1 merge request
!1
Multi platform build
Pipeline
#38787
passed
2 years ago
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Taskfile.yml
+10
-1
10 additions, 1 deletion
Taskfile.yml
with
10 additions
and
1 deletion
Taskfile.yml
+
10
−
1
View file @
e9b798eb
...
...
@@ -24,6 +24,8 @@
# CI_COMMIT_TAG=myTag task build
# this will use the provided version for build linking
BUILD_VERSION
:
"
{{.CI_COMMIT_TAG}}/{{.BUILD_COMMIT_ID}}"
GOOS
:
sh
:
uname | tr '[:upper:]' '[:lower:]'
tasks
:
default
:
...
...
@@ -35,7 +37,7 @@
cmds
:
-
mkdir -p build
-
|
CGO_ENABLED=0 GOOS=
linux
GOARCH=amd64 go build \
CGO_ENABLED=0 GOOS=
{{.GOOS}}
GOARCH=amd64 go build \
-a -tags netgo \
-ldflags "-X 'orus.io/orus-io/beaver/lib.version=${CI_COMMIT_TAG}' -X 'orus.io/orus-io/beaver/lib.commitSha=$(hg id -i --debug)' -X 'orus.io/orus-io/beaver/lib.buildDate=$(date)' -w -extldflags "-static"" \
-o {{.OUTPUT}} \
...
...
@@ -43,6 +45,13 @@
generates
:
-
"
{{.OUTPUT}}"
install
:
desc
:
install binary in $GOPATH/bin
deps
:
-
build
cmds
:
-
install -m 755 {{.OUTPUT}} $GOPATH/bin
fetch-golangci-lint
:
desc
:
fetch golangci-lint tool
cmds
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment