Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions scripts/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,23 +198,25 @@ golang () {
mkdir -p "$dir"

mkdir -p "${dir}"
name="${GIT_REPO}-go/v${RAW_VERSION%%.*}"
if [ "${PROJECT}" == "client" ]; then
name="${GIT_REPO}-go"
fi

npx @openapitools/openapi-generator-cli@2.17.0 version-manager set 7.12.0
npx @openapitools/openapi-generator-cli@2.17.0 generate -i "${SPEC_FILE}" \
-g go \
-o "$dir" \
--git-user-id ory \
--git-repo-id "${GIT_REPO}-go" \
--git-repo-id "${name}" \
--git-host github.com \
-c ./config/client/go.yml.proc.yml
cp "LICENSE" "clients/${PROJECT}/go"

if [ "${PROJECT}" == "hydra" ]; then
(cd "${dir}"; rm go.mod go.sum || true; go mod init "github.com/ory/${PROJECT}-client-go/v2"; go mod tidy -compat=1.17)
elif [ "${PROJECT}" == "client" ]; then
if [ "${PROJECT}" == "client" ]; then
(cd "${dir}"; rm go.mod go.sum || true; go mod init "github.com/ory/client-go"; go mod tidy -compat=1.17)
else
(cd "${dir}"; rm go.mod go.sum || true; go mod init "github.com/ory/${PROJECT}-client-go"; go mod tidy -compat=1.17)
(cd "${dir}"; rm go.mod go.sum || true; go mod init "github.com/ory/${PROJECT}-client-go/v${RAW_VERSION%%.*}"; go mod tidy -compat=1.17)
fi
}

Expand Down
Loading