Skip to content

Commit

Permalink
chore(cmdx connect): set the default os and arch (#16708)
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Oct 26, 2023
1 parent bafb056 commit fc55dce
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions cmdx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,27 @@ tasks:
These arguments are set to AQUA_GOOS and AQUA_GOARCH.
args:
- name: os
required: true
required: false
default: linux
script_envs:
- OS
- name: arch
required: true
required: false
script_envs:
- ARCH
shell:
- "bash"
- "-c"
script: |
set -euxo pipefail
docker exec -ti aqua-registry env AQUA_GOOS="{{.os}}" AQUA_GOARCH="{{.arch}}" bash
set -eux
if [ -z "${ARCH:-}" ]; then
ARCH=$(uname -m)
case $ARCH in
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64" ;;
esac
fi
docker exec -ti aqua-registry env AQUA_GOOS="$OS" AQUA_GOARCH="$ARCH" bash
- name: generate-registry
short: gr
Expand Down

0 comments on commit fc55dce

Please sign in to comment.