mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-27 17:41:17 +02:00
fix(initramfs): quote -X flag (#95)
This commit is contained in:
parent
3dc22fad9b
commit
068017a44c
@ -46,11 +46,11 @@ tasks:
|
|||||||
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/init
|
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/init
|
||||||
{{ if and .Git.IsClean .Git.IsTag }}
|
{{ if and .Git.IsClean .Git.IsTag }}
|
||||||
RUN GOOS=linux GOARCH=amd64 go build \
|
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={{ .Git.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={{ .Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X \"{{ index .Variables "versionPath" }}.Built={{ .Built }}\"" \
|
||||||
-o /initramfs/init
|
-o /initramfs/init
|
||||||
{{ else }}
|
{{ else }}
|
||||||
RUN GOOS=linux GOARCH=amd64 go build \
|
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 }}' \
|
-ldflags "-s -w -linkmode external -extldflags "-static -L/usr/lib -lblkid -luuid" -X {{ index .Variables "versionPath" }}.Name=Dianemo -X {{ index .Variables "versionPath" }}.Tag=none -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }}" \
|
||||||
-o /initramfs/init
|
-o /initramfs/init
|
||||||
{{ end }}
|
{{ end }}
|
||||||
RUN chmod +x /initramfs/init
|
RUN chmod +x /initramfs/init
|
||||||
@ -61,17 +61,17 @@ tasks:
|
|||||||
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/{{ .Docker.CurrentStage }}
|
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/{{ .Docker.CurrentStage }}
|
||||||
{{ if and .Git.IsClean .Git.IsTag }}
|
{{ if and .Git.IsClean .Git.IsTag }}
|
||||||
RUN GOOS=linux GOARCH=amd64 go build -a \
|
RUN GOOS=linux GOARCH=amd64 go build -a \
|
||||||
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag={{ .Git.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={{ .Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X \"{{ index .Variables "versionPath" }}.Built={{ .Built }}\"" \
|
||||||
-o /{{ .Docker.CurrentStage }}-linux-amd64
|
-o /{{ .Docker.CurrentStage }}-linux-amd64
|
||||||
RUN GOOS=darwin GOARCH=amd64 go build -a \
|
RUN GOOS=darwin GOARCH=amd64 go build -a \
|
||||||
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag={{ .Git.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={{ .Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X \"{{ index .Variables "versionPath" }}.Built={{ .Built }}\"" \
|
||||||
-o /{{ .Docker.CurrentStage }}-darwin-amd64
|
-o /{{ .Docker.CurrentStage }}-darwin-amd64
|
||||||
{{ else }}
|
{{ else }}
|
||||||
RUN GOOS=linux GOARCH=amd64 go build -a \
|
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 }}" \
|
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag=none -X {{ index .Variables "versionPath" }}.SH={{ .Git.SHA }}" \
|
||||||
-o /{{ .Docker.CurrentStage }}-linux-amd64
|
-o /{{ .Docker.CurrentStage }}-linux-amd64
|
||||||
RUN GOOS=darwin GOARCH=amd64 go build -a \
|
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 }}" \
|
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Client -X {{ index .Variables "versionPath" }}.Tag=none -X {{ index .Variables "versionPath" }}.SH={{ .Git.SHA }}" \
|
||||||
-o /{{ .Docker.CurrentStage }}-darwin-amd64
|
-o /{{ .Docker.CurrentStage }}-darwin-amd64
|
||||||
{{ end }}
|
{{ end }}
|
||||||
RUN chmod +x /{{ .Docker.CurrentStage }}-linux-amd64
|
RUN chmod +x /{{ .Docker.CurrentStage }}-linux-amd64
|
||||||
@ -81,11 +81,11 @@ tasks:
|
|||||||
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/{{ .Docker.CurrentStage }}
|
WORKDIR $GOPATH/src/github.com/autonomy/dianemo/initramfs/cmd/{{ .Docker.CurrentStage }}
|
||||||
{{ if and .Git.IsClean .Git.IsTag }}
|
{{ if and .Git.IsClean .Git.IsTag }}
|
||||||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a \
|
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={{ .Git.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={{ .Git.Tag }} -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }} -X \"{{ index .Variables "versionPath" }}.Built={{ .Built }}\"" \
|
||||||
-o /{{ .Docker.CurrentStage }}
|
-o /{{ .Docker.CurrentStage }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a \
|
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 }}" \
|
-ldflags "-s -w -X {{ index .Variables "versionPath" }}.Name=Server -X {{ index .Variables "versionPath" }}.Tag=none -X {{ index .Variables "versionPath" }}.SHA={{ .Git.SHA }}" \
|
||||||
-o /{{ .Docker.CurrentStage }}
|
-o /{{ .Docker.CurrentStage }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
RUN chmod +x /{{ .Docker.CurrentStage }}
|
RUN chmod +x /{{ .Docker.CurrentStage }}
|
||||||
@ -112,6 +112,7 @@ tasks:
|
|||||||
RUN protoc -I/usr/local/include -I./proto --go_out=plugins=grpc:proto proto/api.proto
|
RUN protoc -I/usr/local/include -I./proto --go_out=plugins=grpc:proto proto/api.proto
|
||||||
src:
|
src:
|
||||||
template: |
|
template: |
|
||||||
|
|
||||||
FROM dianemo/tools:{{ .Docker.Image.Tag }} AS {{ .Docker.CurrentStage }}
|
FROM dianemo/tools:{{ .Docker.Image.Tag }} AS {{ .Docker.CurrentStage }}
|
||||||
RUN ln -s /tools/lib64 /lib64
|
RUN ln -s /tools/lib64 /lib64
|
||||||
RUN mkdir /tmp
|
RUN mkdir /tmp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user