Skip to content
This repository has been archived by the owner on Apr 1, 2023. It is now read-only.

Commit

Permalink
Use jq instead of sed
Browse files Browse the repository at this point in the history
  • Loading branch information
msavy committed Jul 23, 2021
1 parent c740c7b commit f6ec64d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 85 deletions.
82 changes: 0 additions & 82 deletions registry.json
Original file line number Diff line number Diff line change
@@ -1,82 +0,0 @@
{
"id" : "apiman-plugin-registry",
"name" : "Official apiman Plugins",
"description" : "This plugin registry lists all of the official apiman plugins. No third party plugins are included in this registry.",
"version" : "2.0.0.Final",
"repository" : {
"name" : "Maven Central",
"url" : "https://repo1.maven.org/maven2/"
},
"plugins" : [
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-apikey-policy",
"version" : "2.0.0.Final",
"name" : "API Key Policy Plugin",
"description" : "This plugin provides a policy that can help pass the API Key through to the back-end service."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-cors-policy",
"version" : "2.0.0.Final",
"name" : "CORS Policy Plugin",
"description" : "This plugin implements CORS (Cross-origin resource sharing): A method of controlling access to resources outside of an originating domain."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-header-allow-deny-policy",
"version" : "2.0.0.Final",
"name" : "Header Allow/Deny Policy Plugin",
"description" : "Provides a policy that permits or denies requests matching certain HTTP headers."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-http-security-policy",
"version" : "2.0.0.Final",
"name" : "HTTP Security Policy Plugin",
"description" : "Provides a policy which allows security-related HTTP headers to be set, which can help mitigate a range of common security vulnerabilities."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-jsonp-policy",
"version" : "2.0.0.Final",
"name" : "JSONP Policy Plugin",
"description" : "A plugin that contributes a policy that turns a standard RESTful endpoint into a JSONP compatible endpoint."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-keycloak-oauth-policy",
"version" : "2.0.0.Final",
"name" : "Keycloak OAuth Policy Plugin",
"description" : "This plugin offers an OAuth2 policy which leverages the Keycloak authentication platform as the identity and access provider."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-simple-header-policy",
"version" : "2.0.0.Final",
"name" : "Simple Header Policy Plugin",
"description" : "Offers a simple policy that allows request headers to be added or stripped from the HTTP request (outgoing) or HTTP response (incoming)."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-transformation-policy",
"version" : "2.0.0.Final",
"name" : "XML<->JSON Transformation Policy Plugin",
"description" : "This plugin provides a very simple policy which can transform the request and/or response payload between XML and JSON."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-log-policy",
"version" : "2.0.0.Final",
"name" : "Log Headers Policy",
"description" : "A policy that logs the headers to std out. Useful to analyse inbound HTTP traffic to the gateway when added as the first policy in the chain or to analyse outbound HTTP traffic from the gateway when added as the last policy in the chain."
},
{
"groupId" : "io.apiman.plugins",
"artifactId" : "apiman-plugins-circuit-breaker-policy",
"version" : "2.0.0.Final",
"name" : "Circuit Breaker Policy",
"description" : "This plugin has policies for performing circuit breaker functionality."
}
]
}
7 changes: 4 additions & 3 deletions release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,16 @@ echo "Release Version: $RELEASE_VERSION"
echo "Dev Version: $DEV_VERSION"
echo "######################################"

sed -i -r "s/\"version\".?:.?\".*\"/\"version\" : \"$RELEASE_VERSION\"/g" registry.json

jq ".plugins[].version = \"$RELEASE_VERSION\" | .version = \"$RELEASE_VERSION\"" registry.json > tmp.json
mv tmp.json registry.json
git add .
git commit -m "Prepare for release $RELEASE_VERSION"
git push origin $BRANCH
git tag -a -m "Tagging release $RELEASE_VERSION" $RELEASE_VERSION
git push origin $RELEASE_VERSION

sed -i -r "s/\"version\".?:.?\".*\"/\"version\" : \"$DEV_VERSION\"/g" registry.json
jq ".plugins[].version = \"$RELEASE_VERSION\" | .version = \"$RELEASE_VERSION\"" registry.json > tmp.json
mv tmp.json registry.json
git add .
git commit -m "Update to next development version: $DEV_VERSION"
git push origin $BRANCH

0 comments on commit f6ec64d

Please sign in to comment.