Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nova-password
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
hdacloud
nova-password
Commits
f29d5ed3
Commit
f29d5ed3
authored
4 years ago
by
kayrus
Browse files
Options
Downloads
Patches
Plain Diff
Update Makefile
parent
6ee1ee1a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+8
-13
8 additions, 13 deletions
Makefile
with
8 additions
and
13 deletions
Makefile
+
8
−
13
View file @
f29d5ed3
...
@@ -5,14 +5,12 @@ UID:=$(shell id -u)
...
@@ -5,14 +5,12 @@ UID:=$(shell id -u)
VERSION
:=
$(
shell git describe
--tags
--always
--dirty
=
"-dev"
)
VERSION
:=
$(
shell git describe
--tags
--always
--dirty
=
"-dev"
)
LDFLAGS
:=
-X
main.Version
=
$(
VERSION
)
LDFLAGS
:=
-X
main.Version
=
$(
VERSION
)
export
GO111MODULE
:=
off
export
GOPATH
:=
$(
PWD
)
/gopath
export
CGO_ENABLED
:=
0
export
CGO_ENABLED
:=
0
build
:
gopath/src/$(PKG) fm
t
build
:
fmt ve
t
GOOS
=
linux go build
-ldflags
=
"
$(
LDFLAGS
)
"
-o
bin/
$(
APP_NAME
)
$(
PKG
)
GOOS
=
linux go build
-mod
=
vendor
-ldflags
=
"
$(
LDFLAGS
)
"
-o
bin/
$(
APP_NAME
)
$(
PKG
)
GOOS
=
darwin go build
-ldflags
=
"
$(
LDFLAGS
)
"
-o
bin/
$(
APP_NAME
)
_darwin
$(
PKG
)
GOOS
=
darwin go build
-mod
=
vendor
-ldflags
=
"
$(
LDFLAGS
)
"
-o
bin/
$(
APP_NAME
)
_darwin
$(
PKG
)
GOOS
=
windows go build
-ldflags
=
"
$(
LDFLAGS
)
"
-o
bin/
$(
APP_NAME
)
.exe
$(
PKG
)
GOOS
=
windows go build
-mod
=
vendor
-ldflags
=
"
$(
LDFLAGS
)
"
-o
bin/
$(
APP_NAME
)
.exe
$(
PKG
)
docker
:
docker
:
docker run
-ti
--rm
-e
GOCACHE
=
/tmp
-v
$(
PWD
)
:/
$(
APP_NAME
)
-u
$(
UID
)
:
$(
UID
)
--workdir
/
$(
APP_NAME
)
golang:latest make
docker run
-ti
--rm
-e
GOCACHE
=
/tmp
-v
$(
PWD
)
:/
$(
APP_NAME
)
-u
$(
UID
)
:
$(
UID
)
--workdir
/
$(
APP_NAME
)
golang:latest make
...
@@ -20,11 +18,8 @@ docker:
...
@@ -20,11 +18,8 @@ docker:
fmt
:
fmt
:
gofmt
-s
-w
*
.go
gofmt
-s
-w
*
.go
mod
:
vet
:
GO111MODULE
=
auto go mod download
go vet
-mod
=
vendor ./
GO111MODULE
=
auto go mod tidy
GO111MODULE
=
auto go mod vendor
gopath/src/$(PKG)
:
mod
:
mkdir
-p
gopath/src/
$(
shell
dirname
$(
PKG
))
go mod vendor
ln
-sf
../../../.. gopath/src/
$(
PKG
)
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