Skip to content

Commit

Permalink
build: create windows version for CLI
Browse files Browse the repository at this point in the history
Signed-off-by: Kostis Kapelonis <[email protected]>
  • Loading branch information
kostis-codefresh committed Sep 16, 2021
1 parent 01879e4 commit f63b7e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ jobs:
files: |
dist/kubectl-argo-rollouts-linux-amd64
dist/kubectl-argo-rollouts-darwin-amd64
dist/kubectl-argo-rollouts-windows-amd64
manifests/install.yaml
manifests/namespace-install.yaml
env:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN touch ui/dist/node_modules.marker && \
touch ui/dist/app/index.html && \
find ui/dist

ARG MAKE_TARGET="controller plugin-linux plugin-darwin"
ARG MAKE_TARGET="controller plugin-linux plugin-darwin plugin-windows"
RUN make ${MAKE_TARGET}

####################################################################################################
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ plugin-darwin: ui/dist
cp -r ui/dist/app/* server/static
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${PLUGIN_CLI_NAME}-darwin-amd64 ./cmd/kubectl-argo-rollouts

.PHONY: plugin-windows
plugin-windows: ui/dist
cp -r ui/dist/app/* server/static
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -v -i -ldflags '${LDFLAGS}' -o ${DIST_DIR}/${PLUGIN_CLI_NAME}-windows-amd64 ./cmd/kubectl-argo-rollouts

.PHONY: docs
docs:
go run ./hack/gen-docs/main.go
Expand Down
2 changes: 1 addition & 1 deletion hack/build-release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ docker build --iidfile ${rollout_iid_file} --target argo-rollouts-build .
rollout_iid=$(cat ${rollout_iid_file})
container_id=$(docker create ${rollout_iid})

for plat in linux-amd64 darwin-amd64 ; do
for plat in linux-amd64 darwin-amd64 windows-amd64; do
docker cp ${container_id}:/go/src/github.com/argoproj/argo-rollouts/dist/kubectl-argo-rollouts-${plat} ${SRCROOT}/dist
done
docker rm -v ${container_id}
Expand Down

0 comments on commit f63b7e0

Please sign in to comment.