Skip to content

Commit

Permalink
fix(seed): update seed files to match expected structure (#4804)
Browse files Browse the repository at this point in the history
  • Loading branch information
armandobelardo authored Oct 4, 2024
1 parent 2c36a38 commit 1c15dde
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 27 deletions.
3 changes: 2 additions & 1 deletion seed/csharp-model/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ changelogLocation: ../../generators/csharp/model/versions.yml

buildScripts:
compileScript:
- dotnet build src -c Release /p:ContinuousIntegrationBuild=true .
commands:
- dotnet build src -c Release /p:ContinuousIntegrationBuild=true .

publish:
preBuildCommands:
Expand Down
9 changes: 6 additions & 3 deletions seed/csharp-sdk/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ changelogLocation: ../../generators/csharp/sdk/versions.yml

buildScripts:
preInstallScript:
- dotnet tool restore
commands:
- dotnet tool restore
compileScript:
- dotnet build src -c Release /p:ContinuousIntegrationBuild=true .
commands:
- dotnet build src -c Release /p:ContinuousIntegrationBuild=true .
testScript:
- dotnet test src
commands:
- dotnet test src

publish:
preBuildCommands:
Expand Down
8 changes: 5 additions & 3 deletions seed/fastapi/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ changelogLocation: ../../generators/python/fastapi/versions.yml

buildScripts:
installScript:
- poetry shell
- poetry install
commands:
- poetry shell
- poetry install
compileScript:
- poetry run mypy .
commands:
- poetry run mypy .

publish:
workingDirectory: generators/python
Expand Down
6 changes: 4 additions & 2 deletions seed/go-fiber/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ changelogLocation: ../../generators/go/fiber/versions.yml

buildScripts:
compileScript:
- go build -v ./...
commands:
- go build -v ./...
testScript:
- go test -v ./...
commands:
- go test -v ./...

publish:
workingDirectory: generators/go
Expand Down
6 changes: 4 additions & 2 deletions seed/go-model/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ changelogLocation: ../../generators/go/model/versions.yml

buildScripts:
compileScript:
- go build -v ./...
commands:
- go build -v ./...
testScript:
- go test -v ./...
commands:
- go test -v ./...

publish:
workingDirectory: generators/go
Expand Down
6 changes: 4 additions & 2 deletions seed/go-sdk/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ changelogLocation: ../../generators/go/sdk/versions.yml

buildScripts:
compileScript:
- go build -v ./...
commands:
- go build -v ./...
testScript:
- go test -v ./...
commands:
- go test -v ./...

publish:
workingDirectory: generators/go
Expand Down
3 changes: 2 additions & 1 deletion seed/java-model/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ image: fernapi/fern-java-model

buildScripts:
compileScript:
- ./gradlew compileJava
commands:
- ./gradlew compileJava

publish:
workingDirectory: generators/java
Expand Down
3 changes: 2 additions & 1 deletion seed/java-sdk/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ image: fernapi/fern-java-sdk

buildScripts:
compileScript:
- ./gradlew compileJava
commands:
- ./gradlew compileJava

publish:
workingDirectory: generators/java
Expand Down
8 changes: 5 additions & 3 deletions seed/pydantic/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ changelogLocation: ../../generators/python/pydantic/versions.yml

buildScripts:
installScript:
- poetry shell
- poetry install
commands:
- poetry shell
- poetry install
compileScript:
- poetry run mypy .
commands:
- poetry run mypy .

publish:
workingDirectory: generators/python
Expand Down
13 changes: 8 additions & 5 deletions seed/python-sdk/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@ changelogLocation: ../../generators/python/sdk/versions.yml

buildScripts:
installScript:
- poetry shell
- poetry install
commands:
- poetry shell
- poetry install
compileScript:
- poetry run mypy .
commands:
- poetry run mypy .
testScript:
# TODO: we need to acttually run the mock server tests as well
# Note: not all versions of the generator have this test directory which brings in the unit tests we write
# as a result, the script here only runs pytest if the directory exists, and exits 0 if it does not (e.g. just passes)
- export PYTHON_TEST_DIR="./tests/utils"
- if [ -d "$PYTHON_TEST_DIR" ]; then poetry run pytest -rP "$PYTHON_TEST_DIR"; else echo "Test directory not found. Skipping tests."; fi
commands:
- export PYTHON_TEST_DIR="./tests/utils"
- if [ -d "$PYTHON_TEST_DIR" ]; then poetry run pytest -rP "$PYTHON_TEST_DIR"; else echo "Test directory not found. Skipping tests."; fi

publish:
workingDirectory: generators/python
Expand Down
6 changes: 4 additions & 2 deletions seed/ruby-sdk/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ changelogLocation: ../../generators/ruby/sdk/versions.yml

buildScripts:
installScript:
- bundle install
commands:
- bundle install
testScript:
- bundle exec rake test
commands:
- bundle exec rake test

publish:
preBuildCommands:
Expand Down
6 changes: 4 additions & 2 deletions seed/ts-express/seed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ image: fernapi/fern-typescript-express

buildScripts:
installScript:
- yarn install
commands:
- yarn install
compileScript:
- yarn build
commands:
- yarn build

publish:
versionSubstitution: "$VERSION"
Expand Down

0 comments on commit 1c15dde

Please sign in to comment.