mirror of
https://github.com/hanzoai/cd.git
synced 2026-10-30 14:56:45 +00:00
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.
34 lines
885 B
Bash
Executable File
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
|