Skip to content

Commit

Permalink
Bump version 2.8.2 (#16)
Browse files Browse the repository at this point in the history
* feat: bumb up harbor v2.8.1

Signed-off-by: Lukas Hauser <[email protected]>

* remove legacy and pre-v2 code

Signed-off-by: Lukas Hauser <[email protected]>

* bump version 2.8.2, delete stale files

Signed-off-by: Lukas Hauser <[email protected]>

---------

Signed-off-by: Lukas Hauser <[email protected]>
  • Loading branch information
luka5 authored Jun 21, 2023
1 parent 755c984 commit 24ba81f
Show file tree
Hide file tree
Showing 131 changed files with 9,421 additions and 13,067 deletions.
14 changes: 1 addition & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,13 @@ SWAGGER_VERSION=v0.30.3
SWAGGER := $(DOCKERCMD) run --rm -it -v $(HOME):$(HOME) -w $(shell pwd) quay.io/goswagger/swagger:$(SWAGGER_VERSION)

ifeq ($(VERSION),)
VERSION := v2.6.2
VERSION := v2.8.2
endif

HARBOR_ASSIST_SPEC=api/swagger.yaml
HARBOR_CLIENT_ASSIST_DIR=pkg/sdk/assist
HARBOR_ASSIST_SPEC_URL=https://raw.githubusercontent.com/goharbor/harbor/$(VERSION)/api/swagger.yaml

HARBOR_2.0_SPEC=api/v2.0/swagger.yaml
HARBOR_CLIENT_2.0_DIR=pkg/sdk/v2.0
HARBOR_2.0_SPEC_URL=https://raw.githubusercontent.com/goharbor/harbor/$(VERSION)/api/v2.0/swagger.yaml

HARBOR_2.0_LEGACY_SPEC=api/v2.0/legacy_swagger.yaml
HARBOR_CLIENT_2.0_LEGACY_DIR=pkg/sdk/v2.0/legacy
HARBOR_2.0_LEGACY_SPEC_URL=https://raw.githubusercontent.com/goharbor/harbor/$(VERSION)/api/v2.0/legacy_swagger.yaml

## --------------------------------------
## Help
## --------------------------------------
Expand All @@ -36,15 +28,11 @@ help: ## Display this help
.PHONY: update-spec
update-spec: ## update all swagger spec files
@echo "Downloading spec from Harbor with version: $(VERSION)"
@wget ${HARBOR_ASSIST_SPEC_URL} -O ${HARBOR_ASSIST_SPEC}
@wget ${HARBOR_2.0_SPEC_URL} -O ${HARBOR_2.0_SPEC}
@wget ${HARBOR_2.0_LEGACY_SPEC_URL} -O ${HARBOR_2.0_LEGACY_SPEC}

.PHONY: gen-harbor-api
gen-harbor-api: update-spec ## generate goswagger client for harbor
@$(SWAGGER) generate client -f ${HARBOR_ASSIST_SPEC} --target=$(HARBOR_CLIENT_ASSIST_DIR) --template=stratoscale --additional-initialism=CVE --additional-initialism=GC --additional-initialism=OIDC
@$(SWAGGER) generate client -f ${HARBOR_2.0_SPEC} --target=$(HARBOR_CLIENT_2.0_DIR) --template=stratoscale --additional-initialism=CVE --additional-initialism=GC --additional-initialism=OIDC
@$(SWAGGER) generate client -f ${HARBOR_2.0_LEGACY_SPEC} --target=$(HARBOR_CLIENT_2.0_LEGACY_DIR) --template=stratoscale --additional-initialism=CVE --additional-initialism=GC --additional-initialism=OIDC

.PHONY: test
test: ## run the test
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ api/

## Download swagger spec by version

Currently, the default Harbor version is `v2.5.0`.
Currently, the default Harbor version is `v2.8.2`.

*NOTE* Default version need to be updated manually inside [Makefile](Makefile)

Expand All @@ -29,13 +29,13 @@ make update-spec
To download swagger spec from previous Harbor version, add `VERSION` as an argument:

```sh
make update-spec VERSION=v2.5.0
make update-spec VERSION=v2.8.2
```

## Generate Clients

```sh
make gen-harbor-api VERSION=v2.5.0
make gen-harbor-api VERSION=v2.8.2
```

## Check all available make commands
Expand Down
Loading

0 comments on commit 24ba81f

Please sign in to comment.