Skip to content

Commit 72af690

Browse files
authored
chore: remove submodules and restore clients (#228)
1 parent e2c5927 commit 72af690

File tree

537 files changed

+62290
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

537 files changed

+62290
-75
lines changed

.github/actions/submodule/action.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/check.yml

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- main
99

1010
env:
11-
CACHE_VERSION: '6'
11+
CACHE_VERSION: '7'
1212

1313
concurrency:
1414
group: ${{ github.ref }}
@@ -23,10 +23,6 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- uses: ./.github/actions/submodule
27-
with:
28-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
29-
3026
- name: Setup
3127
id: setup
3228
uses: ./.github/actions/setup
@@ -60,10 +56,6 @@ jobs:
6056
steps:
6157
- uses: actions/checkout@v2
6258

63-
- uses: ./.github/actions/submodule
64-
with:
65-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
66-
6759
- name: Restore cache
6860
uses: ./.github/actions/cache
6961

@@ -89,10 +81,6 @@ jobs:
8981
steps:
9082
- uses: actions/checkout@v2
9183

92-
- uses: ./.github/actions/submodule
93-
with:
94-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
95-
9684
- name: Restore cache
9785
uses: ./.github/actions/cache
9886
with:
@@ -122,10 +110,6 @@ jobs:
122110
steps:
123111
- uses: actions/checkout@v2
124112

125-
- uses: ./.github/actions/submodule
126-
with:
127-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
128-
129113
- name: Restore cache
130114
uses: ./.github/actions/cache
131115
with:
@@ -142,6 +126,12 @@ jobs:
142126
if: steps.cache.outputs.cache-hit != 'true' && matrix.client.name != 'algoliasearch'
143127
run: yarn cli generate javascript ${{ matrix.client.name }}
144128

129+
- name: Check diff with pushed client
130+
if: steps.cache.outputs.cache-hit != 'true'
131+
run: |
132+
git status
133+
exit $(git status --porcelain ${{ matrix.client.folder }} | wc -l)
134+
145135
- name: Build ${{ matrix.client.name }} client
146136
if: steps.cache.outputs.cache-hit != 'true'
147137
run: yarn cli build clients javascript ${{ matrix.client.name }}
@@ -158,10 +148,6 @@ jobs:
158148
steps:
159149
- uses: actions/checkout@v2
160150

161-
- uses: ./.github/actions/submodule
162-
with:
163-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
164-
165151
- name: Restore cache
166152
uses: ./.github/actions/cache
167153
with:
@@ -179,6 +165,12 @@ jobs:
179165
if: steps.cache.outputs.cache-hit != 'true'
180166
run: yarn cli generate java ${{ matrix.client.name }}
181167

168+
- name: Check diff with pushed client
169+
if: steps.cache.outputs.cache-hit != 'true'
170+
run: |
171+
git status
172+
exit $(git status --porcelain ${{ matrix.client.folder }} | wc -l)
173+
182174
- name: Build ${{ matrix.client.name }} client
183175
if: steps.cache.outputs.cache-hit != 'true'
184176
run: yarn cli build clients java ${{ matrix.client.name }}
@@ -195,10 +187,6 @@ jobs:
195187
steps:
196188
- uses: actions/checkout@v2
197189

198-
- uses: ./.github/actions/submodule
199-
with:
200-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
201-
202190
- name: Restore cache
203191
uses: ./.github/actions/cache
204192
with:
@@ -209,6 +197,12 @@ jobs:
209197
if: steps.cache.outputs.cache-hit != 'true'
210198
run: yarn cli generate php ${{ matrix.client.name }}
211199

200+
- name: Check diff with pushed client
201+
if: steps.cache.outputs.cache-hit != 'true'
202+
run: |
203+
git status
204+
exit $(git status --porcelain ${{ matrix.client.folder }} | wc -l)
205+
212206
- name: Build ${{ matrix.client.name }} client
213207
if: steps.cache.outputs.cache-hit != 'true'
214208
run: yarn cli build clients php ${{ matrix.client.name }}
@@ -224,10 +218,6 @@ jobs:
224218
steps:
225219
- uses: actions/checkout@v2
226220

227-
- uses: ./.github/actions/submodule
228-
with:
229-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
230-
231221
- name: Restore cache
232222
id: restore
233223
uses: ./.github/actions/cache
@@ -252,10 +242,6 @@ jobs:
252242
steps:
253243
- uses: actions/checkout@v2
254244

255-
- uses: ./.github/actions/submodule
256-
with:
257-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
258-
259245
- name: Restore cache
260246
id: restore
261247
uses: ./.github/actions/cache

.github/workflows/process-release.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- closed
77

88
env:
9-
CACHE_VERSION: '6'
9+
CACHE_VERSION: '7'
1010

1111
jobs:
1212
build:
@@ -17,12 +17,6 @@ jobs:
1717
- uses: actions/checkout@v2
1818
with:
1919
fetch-depth: 0
20-
submodules: recursive
21-
token: ${{ secrets.TOKEN_RELEASE_BOT }}
22-
23-
- uses: ./.github/actions/submodule
24-
with:
25-
token: $${{ secrets.TOKEN_RELEASE_BOT }}
2620

2721
- name: Setup
2822
id: setup

.gitmodules

Lines changed: 0 additions & 9 deletions
This file was deleted.

clients/algoliasearch-client-java-2

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
*.class
2+
3+
# Mobile Tools for Java (J2ME)
4+
.mtj.tmp/
5+
6+
# Package Files #
7+
*.jar
8+
*.war
9+
*.ear
10+
11+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
12+
hs_err_pid*
13+
14+
# build files
15+
**/target
16+
target
17+
.gradle
18+
build
19+
20+
.openapi-generator
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# OpenAPI Generator Ignore
2+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
3+
4+
# Use this file to prevent files from being overwritten by the generator.
5+
# The patterns follow closely to .gitignore or .dockerignore.
6+
7+
api/**
8+
docs/**
9+
gradle/**
10+
src/**
11+
README.md
12+
13+
.travis.yml
14+
build.sbt
15+
gradle.properties
16+
git_push.sh
17+
pom.xml
18+
gradle*
19+
20+
# Selective source file
21+
algoliasearch-core/com/algolia/auth/**
22+
algoliasearch-core/com/algolia/Configuration.java
23+
algoliasearch-core/com/algolia/Server*.java
24+
algoliasearch-core/com/algolia/StringUtil.java
25+
algoliasearch-core/com/algolia/GzipRequestInterceptor.java
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
package com.algolia;
2+
3+
import java.util.List;
4+
import java.util.Map;
5+
6+
/**
7+
* Callback for asynchronous API call.
8+
*
9+
* @param <T> The return type
10+
*/
11+
public interface ApiCallback<T> {
12+
/**
13+
* This is called when the API call fails.
14+
*
15+
* @param e The exception causing the failure
16+
* @param statusCode Status code of the response if available, otherwise it would be 0
17+
* @param responseHeaders Headers of the response if available, otherwise it would be null
18+
*/
19+
void onFailure(
20+
ApiException e,
21+
int statusCode,
22+
Map<String, List<String>> responseHeaders
23+
);
24+
25+
/**
26+
* This is called when the API call succeeded.
27+
*
28+
* @param result The result deserialized from response
29+
* @param statusCode Status code of the response
30+
* @param responseHeaders Headers of the response
31+
*/
32+
void onSuccess(
33+
T result,
34+
int statusCode,
35+
Map<String, List<String>> responseHeaders
36+
);
37+
38+
/**
39+
* This is called when the API upload processing.
40+
*
41+
* @param bytesWritten bytes Written
42+
* @param contentLength content length of request body
43+
* @param done write end
44+
*/
45+
void onUploadProgress(long bytesWritten, long contentLength, boolean done);
46+
47+
/**
48+
* This is called when the API download processing.
49+
*
50+
* @param bytesRead bytes Read
51+
* @param contentLength content length of the response
52+
* @param done Read end
53+
*/
54+
void onDownloadProgress(long bytesRead, long contentLength, boolean done);
55+
}

0 commit comments

Comments
 (0)