Skip to content

Commit 2017657

Browse files
ci: add install jtd codegen script
1 parent c9be120 commit 2017657

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

.github/workflows/test-and-lint.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,7 @@ jobs:
3030
run: poetry install
3131

3232
- id: install-jtd-codegen
33-
run: |
34-
# Download and unpack jtd-codegen
35-
jtd_codegen_archive_url=$(curl https://api.github.com/repos/jsontypedef/json-typedef-codegen/releases | jq '.[0].assets.[] | select(.name | test("linux-gnu"))' | jq -r '.browser_download_url')
36-
wget $jtd_codegen_archive_url -O jtd-codegen.zip
37-
unzip jtd-codegen.zip
38-
39-
# Install jtd-codegen
40-
chmod +x jtd-codegen
41-
mv jtd-codegen .jtd-codegen/jtd-codegen
42-
export PATH=$PATH:$(pwd)/.jtd-codegen
43-
44-
# Clean up
45-
rm -f jtd-codegen.zip
33+
run: source ./ci/install-jtd-codegen.sh
4634

4735
- run: poetry run poe test jtd_codebuild/tests
4836

ci/install-jtd-codegen

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# Download and unpack jtd-codegen
4+
jtd_codegen_archive_url=$(curl https://api.github.com/repos/jsontypedef/json-typedef-codegen/releases | jq '.[0].assets.[] | select(.name | test("linux-gnu"))' | jq -r '.browser_download_url')
5+
wget $jtd_codegen_archive_url -O jtd-codegen.zip
6+
unzip jtd-codegen.zip
7+
8+
# Install jtd-codegen
9+
chmod +x jtd-codegen
10+
mkdir -p .jtd-codegen
11+
mv jtd-codegen .jtd-codegen/jtd-codegen
12+
export PATH=$PATH:$(pwd)/.jtd-codegen
13+
14+
# Clean up
15+
rm -f jtd-codegen.zip

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy