Skip to content

Commit

Permalink
fix(initramfs): build variables (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored May 20, 2018
1 parent 8701fcb commit b55ce73
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions initramfs/.conform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ tasks:
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/init
{{ if and .Git.IsClean .Git.IsTag }}
RUN GOOS=linux GOARCH=amd64 go build \
-ldflags '-s -w -linkmode external -extldflags "-static -L/usr/lib -lblkid -luuid" -X {{ index .Variables "versionPath" }}.Name=Dianemo -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Image.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built={{ .Built }}' \
-ldflags '-s -w -linkmode external -extldflags "-static -L/usr/lib -lblkid -luuid" -X {{ index .Variables "versionPath" }}.Name=Dianemo -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built=\"{{ .Built }}\"' \
-o /initramfs/init
{{ else }}
RUN GOOS=linux GOARCH=amd64 go build \
Expand All @@ -61,10 +61,10 @@ tasks:
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/{{ .Docker.CurrentStage }}
{{ if and .Git.IsClean .Git.IsTag }}
RUN GOOS=linux GOARCH=amd64 go build -a \
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Image.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built={{ .Built }}" \
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built=\"{{ .Built }}\"" \
-o /{{ .Docker.CurrentStage }}-linux-amd64
RUN GOOS=darwin GOARCH=amd64 go build -a \
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Image.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built={{ .Built }}" \
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built=\"{{ .Built }}\"" \
-o /{{ .Docker.CurrentStage }}-darwin-amd64
{{ else }}
RUN GOOS=linux GOARCH=amd64 go build -a \
Expand All @@ -81,7 +81,7 @@ tasks:
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/{{ .Docker.CurrentStage }}
{{ if and .Git.IsClean .Git.IsTag }}
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a \
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Server -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Image.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built={{ .Built }}" \
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Server -X {{ index .Variables "versionPath" }}.Tag={{ .Docker.Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X {{ index .Variables "versionPath" }}.Built=\"{{ .Built }}\"" \
-o /{{ .Docker.CurrentStage }}
{{ else }}
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a \
Expand Down

0 comments on commit b55ce73

Please sign in to comment.