Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
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
dex
Commits
e7d7c350
Commit
e7d7c350
authored
8 years ago
by
Eric Chiang
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #608 from ericchiang/dev-properly-compile-version
dev branch: properly compile version into docker images
parents
f3783649
3dac0063
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
Makefile
+11
-4
11 additions, 4 deletions
Makefile
cmd/dex/version.go
+1
-1
1 addition, 1 deletion
cmd/dex/version.go
scripts/git-version
+3
-2
3 additions, 2 deletions
scripts/git-version
scripts/rkt-build
+1
-1
1 addition, 1 deletion
scripts/rkt-build
with
16 additions
and
8 deletions
Makefile
+
11
−
4
View file @
e7d7c350
...
@@ -31,6 +31,10 @@ bin/dex: FORCE generated
...
@@ -31,6 +31,10 @@ bin/dex: FORCE generated
bin/example-app
:
FORCE
bin/example-app
:
FORCE
@
go
install
-v
-ldflags
$(
LD_FLAGS
)
$(
REPO_PATH
)
/cmd/example-app
@
go
install
-v
-ldflags
$(
LD_FLAGS
)
$(
REPO_PATH
)
/cmd/example-app
.PHONY
:
release-binary
release-binary
:
@
go build
-o
_output/bin/dex
-v
-ldflags
$(
LD_FLAGS
)
$(
REPO_PATH
)
/cmd/dex
.PHONY
:
generated
.PHONY
:
generated
generated
:
server/templates_default.go
generated
:
server/templates_default.go
...
@@ -67,7 +71,7 @@ _output/images/library-alpine-3.4.aci:
...
@@ -67,7 +71,7 @@ _output/images/library-alpine-3.4.aci:
@
docker2aci docker://alpine:3.4
@
docker2aci docker://alpine:3.4
@
mv
library-alpine-3.4.aci _output/images/library-alpine-3.4.aci
@
mv
library-alpine-3.4.aci _output/images/library-alpine-3.4.aci
_output/images/dex.aci
:
_output/bin/dex _output/images/library-alpine-3.4.aci
_output/images/dex.aci
:
clean-release
_output/bin/dex _output/images/library-alpine-3.4.aci
# Using acbuild to build a application container image.
# Using acbuild to build a application container image.
@
sudo
./scripts/build-aci ./_output/images/library-alpine-3.4.aci
@
sudo
./scripts/build-aci ./_output/images/library-alpine-3.4.aci
@
sudo chown
$(
user
)
:
$(
group
)
_output/images/dex.aci
@
sudo chown
$(
user
)
:
$(
group
)
_output/images/dex.aci
...
@@ -76,8 +80,8 @@ _output/images/dex.aci: _output/bin/dex _output/images/library-alpine-3.4.aci
...
@@ -76,8 +80,8 @@ _output/images/dex.aci: _output/bin/dex _output/images/library-alpine-3.4.aci
aci
:
_output/images/dex.aci
aci
:
_output/images/dex.aci
.PHONY
:
docker-image
.PHONY
:
docker-image
docker-image
:
_output/bin/dex
docker-image
:
clean-release
_output/bin/dex
@
docker build
-t
$(
DOCKER_IMAGE
)
.
@
sudo
docker build
-t
$(
DOCKER_IMAGE
)
.
.PHONY
:
grpc
.PHONY
:
grpc
grpc
:
api/api.pb.go
grpc
:
api/api.pb.go
...
@@ -91,8 +95,11 @@ bin/protoc: scripts/get-protoc
...
@@ -91,8 +95,11 @@ bin/protoc: scripts/get-protoc
bin/protoc-gen-go
:
bin/protoc-gen-go
:
@
go
install
-v
$(
REPO_PATH
)
/vendor/github.com/golang/protobuf/protoc-gen-go
@
go
install
-v
$(
REPO_PATH
)
/vendor/github.com/golang/protobuf/protoc-gen-go
clean
:
clean
:
clean-release
@
rm
-rf
bin/
@
rm
-rf
bin/
.PHONY
:
clean-release
clean-release
:
@
rm
-rf
_output/
@
rm
-rf
_output/
testall
:
testrace vet fmt lint
testall
:
testrace vet fmt lint
...
...
This diff is collapsed.
Click to expand it.
cmd/dex/version.go
+
1
−
1
View file @
e7d7c350
...
@@ -13,7 +13,7 @@ func commandVersion() *cobra.Command {
...
@@ -13,7 +13,7 @@ func commandVersion() *cobra.Command {
Use
:
"version"
,
Use
:
"version"
,
Short
:
"Print the version and exit"
,
Short
:
"Print the version and exit"
,
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
Run
:
func
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
fmt
.
Printf
(
`dex Version:%s
fmt
.
Printf
(
`dex Version:
%s
Go Version: %s
Go Version: %s
Go OS/ARCH: %s %s
Go OS/ARCH: %s %s
`
,
version
.
Version
,
runtime
.
Version
(),
runtime
.
GOOS
,
runtime
.
GOARCH
)
`
,
version
.
Version
,
runtime
.
Version
(),
runtime
.
GOOS
,
runtime
.
GOARCH
)
...
...
This diff is collapsed.
Click to expand it.
scripts/git-version
+
3
−
2
View file @
e7d7c350
#!/bin/bash -e
#!/bin/sh -e
# Since this script will be run in a rkt container, use "/bin/sh" instead of "/bin/bash"
# parse the current git commit hash
# parse the current git commit hash
COMMIT
=
`
git rev-parse HEAD
`
COMMIT
=
`
git rev-parse HEAD
`
...
@@ -18,4 +19,4 @@ if [ -n "$(git diff --shortstat 2> /dev/null | tail -n1)" ]; then
...
@@ -18,4 +19,4 @@ if [ -n "$(git diff --shortstat 2> /dev/null | tail -n1)" ]; then
VERSION
=
"
${
VERSION
}
-dirty"
VERSION
=
"
${
VERSION
}
-dirty"
fi
fi
echo
$VERSION
echo
$VERSION
\ No newline at end of file
This diff is collapsed.
Click to expand it.
scripts/rkt-build
+
1
−
1
View file @
e7d7c350
...
@@ -10,4 +10,4 @@ sudo rkt run \
...
@@ -10,4 +10,4 @@ sudo rkt run \
--insecure-options
=
image
\
--insecure-options
=
image
\
docker://golang:1.7.1-alpine
\
docker://golang:1.7.1-alpine
\
--exec
=
/bin/sh
--
-x
-c
\
--exec
=
/bin/sh
--
-x
-c
\
'apk add --no-cache --update alpine-sdk &&
go install -v
github.com/coreos/dex
/cmd/dex && cp /go/bin/dex /go/src/github.com/coreos/dex/_output/bin
'
'apk add --no-cache --update alpine-sdk &&
cd /go/src/
github.com/coreos/dex
&& make release-binary
'
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