Skip to content

Commit

Permalink
use properties instead of sed
Browse files Browse the repository at this point in the history
  • Loading branch information
stelzo committed Apr 7, 2024
1 parent 08cb901 commit 79ffa11
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/generate-sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
with:
generator: java
openapi-file: openapi-3.0.yaml
command-args: --additional-properties=apiPackage=com.dofusdude.client.api,artifactDescription=dofusdude-client,artifactId=dofusdude-java,artifactUrl=https://github.com/dofusdude/dofusdude-java,developerEmail=stelzo@steado.de,developerName=stelzo,developerOrganization=dofusdude,developerOrganizationUrl=https://github.com/dofusdude,invokerPackage=com.dofusdude.client,modelPackage=com.dofusdude.client.model,groupId=com.dofusdude,useJakartaEe=true
command-args: --additional-properties=licenseName=GPLv3,licenseUrl=https://www.gnu.org/licenses/gpl-3.0.txt,scmDeveloperConnection=scm:git:git@github.com:dofusdude/dofusdude-java.git,scmConnection=scm:git:git@github.com:dofusdude/dofusdude-java.git,apiPackage=com.dofusdude.client.api,artifactDescription=dofusdude-client,artifactId=dofusdude-java,artifactUrl=https://github.com/dofusdude/dofusdude-java,developerEmail=stelzo@steado.de,developerName=stelzo,developerOrganization=dofusdude,developerOrganizationUrl=https://github.com/dofusdude,invokerPackage=com.dofusdude.client,modelPackage=com.dofusdude.client.model,groupId=com.dofusdude,useJakartaEe=true

- name: Add actions and patch pom.xml
run: |
Expand All @@ -127,8 +127,6 @@ jobs:
printf '%s\n' 'name: Build' 'on:' ' push:' ' branches: [ main ]' ' pull_request:' ' branches: [ main ]' 'jobs:' ' build:' ' runs-on: ubuntu-latest' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' - name: Verify and test' ' run: mvn --batch-mode --update-snapshots verify && mvn test' > .github/workflows/build.yml
printf '%s\n' 'name: Upload Java Maven Package' 'on:' ' release:' ' types: [created]' 'jobs:' ' deploy:' ' runs-on: ubuntu-latest' ' permissions:' ' contents: read' ' packages: write' ' steps:' ' - uses: actions/checkout@v4' ' - name: Set up Java' ' uses: actions/setup-java@v4' ' with:' ' java-version: "17"' ' distribution: "temurin"' ' - name: Release Maven package' ' run: mvn --batch-mode deploy' ' env:' ' GITHUB_TOKEN: secrets.GITHUB_TOKEN' > .github/workflows/publish.yml
sed -i 's/secrets.GITHUB_TOKEN/\$\{\{secrets.GITHUB_TOKEN\}\}/g' .github/workflows/publish.yml
sed -i 's|</description>|</description><url>https://github.com/dofusdude/dofusdude-java</url>|g' pom.xml
sed -i 's|<build>|<scm><connection>scm:git:git@github.com:dofusdude/dofusdude-java.git</connection><developerConnection>scm:git:git@github.com:dofusdude/dofusdude-java.git</developerConnection><url>https://github.com/dofusdude/dofusdude-java/tree/main</url></scm><licenses><license><name>GNU General Public License 3</name><url>https://www.gnu.org/licenses/gpl-3.0.txt</url><distribution>repo</distribution></license></licenses><developers><developer><id>stelzo</id><name>Christopher Sieh</name><url>https://github.com/stelzo</url><roles><role>developer</role></roles></developer></developers><build>|g' pom.xml
sed -i 's|</plugins>|<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>3.6.3</version><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions></plugin></plugins>|g' pom.xml
sed -i 's|</plugins>|<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.3.0</version><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin></plugins>|g' pom.xml
sed -i 's|</dependencies>| <dependency><groupId>org.openapitools</groupId><artifactId>jackson-databind-nullable</artifactId><version>0.2.6</version></dependency></dependencies>|g' pom.xml
Expand Down

0 comments on commit 79ffa11

Please sign in to comment.