api
This commit is contained in:
28
frontend/web/api-doc/release/.release-it.json
Normal file
28
frontend/web/api-doc/release/.release-it.json
Normal file
@ -0,0 +1,28 @@
|
||||
{
|
||||
"hooks": {
|
||||
"before:bump": [
|
||||
"./release/check-for-breaking-changes.sh ${latestVersion} ${version}",
|
||||
"npm update swagger-client",
|
||||
"npm test"
|
||||
],
|
||||
"after:bump": ["npm run build"],
|
||||
"after:release": "export GIT_TAG=v${version} && echo GIT_TAG=v${version} > release/.version"
|
||||
},
|
||||
"git": {
|
||||
"requireUpstream": false,
|
||||
"changelog": "./release/get-changelog.sh",
|
||||
"commitMessage": "chore(release): cut the v${version} release",
|
||||
"tagName": "v${version}",
|
||||
"push": false
|
||||
},
|
||||
"github": {
|
||||
"release": true,
|
||||
"releaseName": "Swagger UI v${version} Released!",
|
||||
"draft": true
|
||||
},
|
||||
"plugins": {
|
||||
"@release-it/conventional-changelog": {
|
||||
"preset": "angular"
|
||||
}
|
||||
}
|
||||
}
|
14
frontend/web/api-doc/release/check-for-breaking-changes.sh
Executable file
14
frontend/web/api-doc/release/check-for-breaking-changes.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
CURRENT_VERSION=$1
|
||||
NEXT_VERSION=$2
|
||||
CURRENT_MAJOR=${CURRENT_VERSION:0:1}
|
||||
NEXT_MAJOR=${NEXT_VERSION:0:1}
|
||||
|
||||
if [ "$CURRENT_MAJOR" -ne "$NEXT_MAJOR" ] ;
|
||||
then if [ "$BREAKING_OKAY" = "true" ];
|
||||
then echo "breaking change detected but BREAKING_OKAY is set; continuing." && exit 0;
|
||||
else echo "breaking change detected and BREAKING_OKAY is not set; aborting." && exit 1;
|
||||
fi;
|
||||
fi;
|
||||
|
||||
echo "next version is not a breaking change; continuing.";
|
5
frontend/web/api-doc/release/get-changelog.sh
Executable file
5
frontend/web/api-doc/release/get-changelog.sh
Executable file
@ -0,0 +1,5 @@
|
||||
echo "_No release summary included._\n\n#### Changelog\n"
|
||||
|
||||
PREV_RELEASE_REF=$(git log --pretty=oneline | grep ' release: ' | head -n 2 | tail -n 1 | cut -f 1 -d " ")
|
||||
|
||||
git log --pretty=oneline $PREV_RELEASE_REF..HEAD | awk '{ $1=""; print}' | sed -e 's/^[ \t]*//' | sed 's/^feat/0,feat/' | sed 's/^improve/1,improve/' | sed 's/^fix/2,fix/'| sort | sed 's/^[0-2],//' | sed 's/^/* /'
|
Reference in New Issue
Block a user