Skip to content

Commit

Permalink
Update Swagger-UI to latest release v5.17.14 (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaby authored Jul 12, 2024
1 parent 85bf74a commit 0590c09
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: daily
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
test:
strategy:
matrix:
go-versions: [ '1.16.x', '1.17.x', '1.18.x' ]
go-versions: [ '1.20.x', '1.21.x', '1.22.x' ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-versions }}
- name: test
run: go test -coverprofile=coverage.txt -covermode=atomic
run: go test -race -coverprofile=coverage.txt -covermode=atomic
- name: coverage
run: bash <(curl -s https://codecov.io/bash)
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ all: build
init:
git submodule update --init --recursive

.PHONY: build
build:
.PHONY: update-submodule
update-submodule: init
# Fetch the latest tags
cd swagger-ui && git fetch --tags
# Get the latest tag
$(eval LATEST_TAG := $(shell cd swagger-ui && git describe --tags `git rev-list --tags --max-count=1`))
@echo "Latest tag for swagger-ui: $(LATEST_TAG)"
# Checkout the latest tag
cd swagger-ui && git checkout $(LATEST_TAG)
@echo "Updated submodule swagger-ui to latest tag: ${LATEST_TAG}"

.PHONY: clean
clean:
rm -rf dist/*

.PHONY: build
build: clean
cp -r swagger-ui/dist/* dist/
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
[![Build Status](https://github.com/swaggo/files/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/features/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/swaggo/files)](https://goreportcard.com/report/github.com/swaggo/files)

Generate swagger ui embedded files by using:
## How to update submodule and create a new bundle:

```console
# Update submodule to latest tagged release of swagger-ui
make update-submodule

# Create new dist bundle
make build
```
make
```

You can now create a commit and push changes to GitHub
2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Large diffs are not rendered by default.

0 comments on commit 0590c09

Please sign in to comment.