mirror of
https://gitea.com/gitea/docs.git
synced 2026-09-17 19:55:34 +00:00
Remove outdated versions and keep the latest 5 versions(include the current developing version and latest 4 stable versions (#304)
Resolve #302 Reviewed-on: https://gitea.com/gitea/docs/pulls/304 Reviewed-by: delvh <[email protected]>
This commit is contained in:
@@ -16,13 +16,10 @@ jobs:
|
||||
sed -i "$@" 's\"basePath": "{{AppSubUrl | JSEscape}}/api/v1"\"basePath": "https://gitea.com/api/v1"\' v1_json.tmpl
|
||||
mv v1_json.tmpl static/swagger-latest.json
|
||||
|
||||
for ver in '1.24.7' '1.23.8' '1.22.6' '1.21.11' '1.20.6' '1.19.4'; do
|
||||
for ver in '1.25.1' '1.24.7' '1.23.8' '1.22.6'; do
|
||||
wget https://raw.githubusercontent.com/go-gitea/gitea/refs/tags/v${ver}/templates/swagger/v1_json.tmpl
|
||||
sed -i "$@" "s|\"version\": \"{{AppVer \| JSEscape}}\"|\"version\": \"${ver}\"|" v1_json.tmpl
|
||||
sed -i "$@" 's\"basePath": "{{AppSubUrl | JSEscape}}/api/v1"\"basePath": "https://gitea.com/api/v1"\' v1_json.tmpl
|
||||
# for version < 1.21.11
|
||||
sed -i "$@" "s|\"version\": \"{{AppVer \| JSEscape \| Safe}}\"|\"version\": \"${ver}\"|" v1_json.tmpl
|
||||
sed -i "$@" 's\"basePath": "{{AppSubUrl | JSEscape | Safe}}/api/v1"\"basePath": "https://gitea.com/api/v1"\' v1_json.tmpl
|
||||
minor=$(echo "$ver" | cut -d '.' -f 2)
|
||||
mv v1_json.tmpl static/swagger-$minor.json
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user