Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh onfido-java after onfido-openapi-spec update (a34b6d8) #119

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: integration-tests
environment: delivery
if: github.event_name == 'release'
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_ACTION_ACCESS_TOKEN }}
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
Expand All @@ -83,31 +80,3 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Update CHANGELOG.md
run: |
TMP_FILE=$(mktemp)

RELEASE_VERSION=$(jq -r '.release' .release.json)
RELEASE_DATE=`date +'%dth %B %Y' | sed -E 's/^0//;s/^([2,3]?)1th/\11st/;s/^([2]?)2th/\12nd/;s/^([2]?)3th/\13rd/'`

SPEC_COMMIT_SHA=$(jq -r '.source.short_sha' .release.json)
SPEC_COMMIT_URL=$(jq -r '.source.repo_url + "/commit/" + .source.long_sha' .release.json)
SPEC_RELEASE_VERSION=$(jq -r '.source.version' .release.json)
SPEC_RELEASE_URL=$(jq -r '.source.repo_url + "/releases/tag/" + .source.version' .release.json)

echo -e "# Changelog\n\n## $RELEASE_VERSION $RELEASE_DATE\n\n" >| $TMP_FILE
echo -en "${{ github.event.release.body }}\nBased on Onfido OpenAPI spec " >> $TMP_FILE

if [ -z $SPEC_RELEASE_VERSION ]; then
echo "up to commit [$SPEC_COMMIT_SHA](${SPEC_COMMIT_URL})." >> $TMP_FILE
else
echo "version [$SPEC_RELEASE_VERSION](${SPEC_RELEASE_URL})." >> $TMP_FILE
fi

grep -v "^# Changelog" CHANGELOG.md >> $TMP_FILE
mv $TMP_FILE CHANGELOG.md

git config user.name "GitHub Actions Bot"
git config user.email "<>"
git commit -m "Update CHANGELOG.md after library release" CHANGELOG.md
git push
8 changes: 4 additions & 4 deletions .release.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"source": {
"repo_url": "https://github.com/onfido/onfido-openapi-spec",
"short_sha": "e92d340",
"long_sha": "e92d340b84690cce6851fa4a32530ac29911d75a",
"version": ""
"short_sha": "a34b6d8",
"long_sha": "a34b6d86714f7f74da2d60a33a76ec3a693d264a",
"version": "v3.0.0"
},
"release": "v4.0.0"
"release": "v3.2.0"
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v3.2.0 24th June 2024

- Library has been rebuilt from scratch and automatically generated on [Onfido OpenAPI Spec](https://github.com/onfido/onfido-openapi-spec) (release [v3.0.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.0.0))
- Integration tests have been refreshed and API coverage increased

## v3.1.0 13th May 2024 (pre-release)

- Include `nexus-staging-maven-plugin` only when necessary
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.onfido</groupId>
<artifactId>onfido-api-java</artifactId>
<version>4.0.0</version>
<version>3.2.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -57,7 +57,7 @@ Add this dependency to your project's build file:
}

dependencies {
implementation "com.onfido:onfido-api-java:4.0.0"
implementation "com.onfido:onfido-api-java:3.2.0"
}
```

Expand All @@ -71,10 +71,10 @@ mvn clean package

Then manually install the following JARs:

- `target/onfido-api-java-4.0.0.jar`
- `target/onfido-api-java-3.2.0.jar`
- `target/lib/*.jar`

The latest version can be found at: https://search.maven.org/artifact/com.onfido/4.0.0
The latest version can be found at: https://search.maven.org/artifact/com.onfido/3.2.0

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'com.onfido'
version = '4.0.0'
version = '3.2.0'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.onfido",
name := "onfido-api-java",
version := "4.0.0",
version := "3.2.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>onfido-api-java</artifactId>
<packaging>jar</packaging>
<name>onfido-api-java</name>
<version>4.0.0</version>
<version>3.2.0</version>
<url>https://documentation.onfido.com</url>
<description>Official Java API client library for the Onfido API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("onfido-java/4.0.0");
setUserAgent("onfido-java/3.2.0");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class Configuration {
public static final String VERSION = "4.0.0";
public static final String VERSION = "3.2.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/onfido/FileTransfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public FileTransfer(byte[] byteArray, String filename) {
/**
* Create a new file transfer from a File
*
* @param file File to include in transfer
* @param inputFile File to include in transfer
* @throws ApiException
*/
public FileTransfer(File inputFile) {
Expand Down