Skip to content

Commit 9d4ddfe

Browse files
authored
chore(ci): commit delete files (#692)
1 parent 7137033 commit 9d4ddfe

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.github/actions/restore-artifacts/action.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ runs:
6262
- name: Unzip clients-javascript artifact
6363
if: ${{ inputs.javascript == 'true' && inputs.type == 'all' }}
6464
shell: bash
65-
run: unzip -q -o clients-javascript.zip && rm clients-javascript.zip
65+
run: |
66+
rm -rf clients/algoliasearch-client-javascript
67+
rm -rf tests/output/javascript/src/client || true
68+
rm -rf tests/output/javascript/src/methods || true
69+
unzip -q -o clients-javascript.zip && rm clients-javascript.zip
6670
6771
# PHP
6872
- name: Download clients-php artifact
@@ -74,7 +78,11 @@ runs:
7478
- name: Unzip clients-php artifact
7579
if: ${{ inputs.php == 'true' && inputs.type == 'all' }}
7680
shell: bash
77-
run: unzip -q -o clients-php.zip && rm clients-php.zip
81+
run: |
82+
rm -rf clients/algoliasearch-client-php
83+
rm -rf tests/output/php/src/client || true
84+
rm -rf tests/output/php/src/methods || true
85+
unzip -q -o clients-php.zip && rm clients-php.zip
7886
7987
# Java
8088
- name: Download clients-java artifact
@@ -86,4 +94,8 @@ runs:
8694
- name: Unzip clients-java artifact
8795
if: ${{ inputs.java == 'true' && inputs.type == 'all' }}
8896
shell: bash
89-
run: unzip -q -o clients-java.zip && rm clients-java.zip
97+
run: |
98+
rm -rf clients/algoliasearch-client-java-2
99+
rm -rf tests/output/java/src/test/java/com/algolia/client || true
100+
rm -rf tests/output/java/src/test/java/com/algolia/methods || true
101+
unzip -q -o clients-java.zip && rm clients-java.zip

.github/workflows/check.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,9 @@ jobs:
242242
run: yarn cli cts run ${{ matrix.client.language }}
243243

244244
- name: Zip artifact before storing
245-
run: zip -r -y clients-${{ matrix.client.language }}.zip ${{ matrix.client.path }} ${{ matrix.client.testsToStore }} -x "**/node_modules**" "clients/algoliasearch-client-javascript/.yarn**" "**/.github**"
245+
run:
246+
zip -r -y clients-${{ matrix.client.language }}.zip ${{ matrix.client.path }} ${{ matrix.client.testsToStore }} -x \
247+
"**/node_modules**" "clients/algoliasearch-client-javascript/.yarn**" "**/.github**" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/vendor/**"
246248

247249
- name: Store ${{ matrix.client.language }} clients
248250
uses: actions/upload-artifact@v3

scripts/ci/husky/pre-commit.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ async function preCommit() {
3838
}
3939
}
4040

41-
const stagedFiles = (
42-
await run('git diff --name-only --cached --diff-filter=d')
43-
).split('\n');
41+
const stagedFiles = (await run('git diff --name-only --cached')).split('\n');
4442

4543
const toUnstage = micromatch.match(stagedFiles, getPatterns());
4644

0 commit comments

Comments
 (0)