Files
cd/hack/update-openapi.sh
zeekay bcbea6fbf4 hack: drop Argo wording, fix stale upstream-fork paths it left behind
Renames local identifiers (argoClientSet/argoDB/argoappv1 etc.) and
comments to our own voice. Also fixes real bugs the old wording was
masking: update-manifests.sh's image detection still compared against
quay.io/argoproj/argocd so it never matched our ghcr.io/hanzoai/cd
image; the codegen scripts pointed GOPATH at the upstream import path;
start-redis-with-password.sh grepped a manifest filename that no
longer exists; generate-actions-list.sh linked generated docs at our
own repo now instead of upstream's file layout.
2026-09-05 01:11:22 -07:00

34 lines
885 B
Bash
Executable File

#!/bin/bash
set -x
set -o errexit
set -o nounset
set -o pipefail
PROJECT_ROOT=$(
cd "$(dirname "$0")/.."
pwd
)
PATH="${PROJECT_ROOT}/dist:${PATH}"
GOPATH=$(go env GOPATH)
GOPATH_PROJECT_ROOT="${GOPATH}/src/github.com/hanzoai/cd"
VERSION="v1alpha1"
[ -e ./v3 ] || ln -s . v3
[ -e "${GOPATH_PROJECT_ROOT}" ] || (mkdir -p "$(dirname "${GOPATH_PROJECT_ROOT}")" && ln -s "${PROJECT_ROOT}" "${GOPATH_PROJECT_ROOT}")
openapi-gen \
--go-header-file "${PROJECT_ROOT}/hack/custom-boilerplate.go.txt" \
--output-pkg github.com/hanzoai/cd/pkg/apis/application/${VERSION} \
--report-filename pkg/apis/api-rules/violation_exceptions.list \
--output-dir "${GOPATH}/src" \
"$@"
[ -L "${GOPATH_PROJECT_ROOT}" ] && rm -rf "${GOPATH_PROJECT_ROOT}"
[ -L ./v3 ] && rm -rf v3
export GO111MODULE=on
go build -o ./dist/gen-crd-spec "${PROJECT_ROOT}/hack/gen-crd-spec"
./dist/gen-crd-spec