Skip to content

Commit

Permalink
change task order and remove extra gomod files in mod task
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma committed Jan 17, 2024
1 parent 65b8f72 commit ff9d028
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ generate-all:
done

mod:
rm -f go.mod go.sum ${PACKAGE_PREFIX}/${PACKAGE_MAJOR}/go.mod ${PACKAGE_PREFIX}/${PACKAGE_MAJOR}/go.sum
for goModOrSum in $(shell set -x; find . -not \( -path ./examples -prune \) -name go.mod -o -name go.sum | sort -n); do \
rm -f $$goModOrSum;\
done
${GO_CMD} go mod init github.com/${GIT_ORG}/${GIT_REPO}
${GO_CMD} go mod tidy

test: mod
test:
${GO_CMD} go test -v ./...

lint:
Expand Down
6 changes: 2 additions & 4 deletions Makefile.metalv1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPEC_PATCHED_DIR=${SPEC_BASE_DIR}/${PACKAGE_NAME}/oas3.patched

all: pull fetch patch generate stage

generate: clean codegen remove-unused patch-post fmt test
generate: clean codegen remove-unused patch-post fmt mod test

pull:
${CRI} pull ${OPENAPI_IMAGE}
Expand Down Expand Up @@ -60,6 +60,4 @@ remove-unused:
rm -rf ${CODE_DIR}/api \
${CODE_DIR}/.travis.yml \
${CODE_DIR}/git_push.sh \
${CODE_DIR}/.openapi-generator \
${CODE_DIR}/go.mod \
${CODE_DIR}/go.sum
${CODE_DIR}/.openapi-generator
6 changes: 2 additions & 4 deletions templates/Makefile.sdk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SPEC_PATCHED_DIR=${SPEC_BASE_DIR}/${PACKAGE_NAME}/oas3.patched

all: pull fetch patch generate stage

generate: clean codegen remove-unused patch-post fmt test
generate: clean codegen remove-unused patch-post mod fmt test

pull:
${CRI} pull ${OPENAPI_IMAGE}
Expand Down Expand Up @@ -60,6 +60,4 @@ remove-unused:
rm -rf ${CODE_DIR}/api \
${CODE_DIR}/.travis.yml \
${CODE_DIR}/git_push.sh \
${CODE_DIR}/.openapi-generator \
${CODE_DIR}/go.mod \
${CODE_DIR}/go.sum
${CODE_DIR}/.openapi-generator

0 comments on commit ff9d028

Please sign in to comment.