Skip to content

Commit

Permalink
chore: remove submodules and restore clients (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcuts authored Mar 4, 2022
1 parent e2c5927 commit 72af690
Show file tree
Hide file tree
Showing 537 changed files with 62,290 additions and 75 deletions.
23 changes: 0 additions & 23 deletions .github/actions/submodule/action.yml

This file was deleted.

52 changes: 19 additions & 33 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- main

env:
CACHE_VERSION: '6'
CACHE_VERSION: '7'

concurrency:
group: ${{ github.ref }}
Expand All @@ -23,10 +23,6 @@ jobs:
with:
fetch-depth: 0

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Setup
id: setup
uses: ./.github/actions/setup
Expand Down Expand Up @@ -60,10 +56,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache

Expand All @@ -89,10 +81,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand Down Expand Up @@ -122,10 +110,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand All @@ -142,6 +126,12 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true' && matrix.client.name != 'algoliasearch'
run: yarn cli generate javascript ${{ matrix.client.name }}

- name: Check diff with pushed client
if: steps.cache.outputs.cache-hit != 'true'
run: |
git status
exit $(git status --porcelain ${{ matrix.client.folder }} | wc -l)
- name: Build ${{ matrix.client.name }} client
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli build clients javascript ${{ matrix.client.name }}
Expand All @@ -158,10 +148,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand All @@ -179,6 +165,12 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli generate java ${{ matrix.client.name }}

- name: Check diff with pushed client
if: steps.cache.outputs.cache-hit != 'true'
run: |
git status
exit $(git status --porcelain ${{ matrix.client.folder }} | wc -l)
- name: Build ${{ matrix.client.name }} client
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli build clients java ${{ matrix.client.name }}
Expand All @@ -195,10 +187,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
uses: ./.github/actions/cache
with:
Expand All @@ -209,6 +197,12 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli generate php ${{ matrix.client.name }}

- name: Check diff with pushed client
if: steps.cache.outputs.cache-hit != 'true'
run: |
git status
exit $(git status --porcelain ${{ matrix.client.folder }} | wc -l)
- name: Build ${{ matrix.client.name }} client
if: steps.cache.outputs.cache-hit != 'true'
run: yarn cli build clients php ${{ matrix.client.name }}
Expand All @@ -224,10 +218,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
id: restore
uses: ./.github/actions/cache
Expand All @@ -252,10 +242,6 @@ jobs:
steps:
- uses: actions/checkout@v2

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Restore cache
id: restore
uses: ./.github/actions/cache
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/process-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- closed

env:
CACHE_VERSION: '6'
CACHE_VERSION: '7'

jobs:
build:
Expand All @@ -17,12 +17,6 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
token: ${{ secrets.TOKEN_RELEASE_BOT }}

- uses: ./.github/actions/submodule
with:
token: $${{ secrets.TOKEN_RELEASE_BOT }}

- name: Setup
id: setup
Expand Down
9 changes: 0 additions & 9 deletions .gitmodules

This file was deleted.

1 change: 0 additions & 1 deletion clients/algoliasearch-client-java-2
Submodule algoliasearch-client-java-2 deleted from bd8719
20 changes: 20 additions & 0 deletions clients/algoliasearch-client-java-2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.class

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.ear

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

# build files
**/target
target
.gradle
build

.openapi-generator
25 changes: 25 additions & 0 deletions clients/algoliasearch-client-java-2/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

api/**
docs/**
gradle/**
src/**
README.md

.travis.yml
build.sbt
gradle.properties
git_push.sh
pom.xml
gradle*

# Selective source file
algoliasearch-core/com/algolia/auth/**
algoliasearch-core/com/algolia/Configuration.java
algoliasearch-core/com/algolia/Server*.java
algoliasearch-core/com/algolia/StringUtil.java
algoliasearch-core/com/algolia/GzipRequestInterceptor.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.algolia;

import java.util.List;
import java.util.Map;

/**
* Callback for asynchronous API call.
*
* @param <T> The return type
*/
public interface ApiCallback<T> {
/**
* This is called when the API call fails.
*
* @param e The exception causing the failure
* @param statusCode Status code of the response if available, otherwise it would be 0
* @param responseHeaders Headers of the response if available, otherwise it would be null
*/
void onFailure(
ApiException e,
int statusCode,
Map<String, List<String>> responseHeaders
);

/**
* This is called when the API call succeeded.
*
* @param result The result deserialized from response
* @param statusCode Status code of the response
* @param responseHeaders Headers of the response
*/
void onSuccess(
T result,
int statusCode,
Map<String, List<String>> responseHeaders
);

/**
* This is called when the API upload processing.
*
* @param bytesWritten bytes Written
* @param contentLength content length of request body
* @param done write end
*/
void onUploadProgress(long bytesWritten, long contentLength, boolean done);

/**
* This is called when the API download processing.
*
* @param bytesRead bytes Read
* @param contentLength content length of the response
* @param done Read end
*/
void onDownloadProgress(long bytesRead, long contentLength, boolean done);
}
Loading

0 comments on commit 72af690

Please sign in to comment.