Skip to content

Commit f43a644

Browse files
[release] fix docs (#138)
1 parent 9b691af commit f43a644

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
lines changed

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
run: |
3535
./scripts/docs/generate_quickstart.sh 02_Quickstart.md
3636
./scripts/docs/generate_examples.sh __Examples.md
37-
cat docs/0*.md > README.md
37+
cat docs/0*.md | grep -v "This section was auto-generated by" > README.md
3838
3939
- name: Create Pull Request
4040
uses: peter-evans/create-pull-request@v6

Makefile

+1-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ SHELL := /bin/bash
22
PWD := $(shell pwd)
33

44
dotnet-format:
5-
dotnet format \
6-
--exclude GeneratedProtobuf \
7-
--exclude examples
5+
dotnet format --exclude GeneratedProtobuf --exclude examples
86

97
protobuf-generate:
108
#./scripts/generate_protobuf.sh

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ sqlc-gen-csharp is a .Net plugin for [sqlc](https://github.com/sqlc-dev/sqlc).<b
1414
| namespaceName | default: the generated project name | Yes | Allows you to override the namespace name to be different than the project name |
1515
| useDapper | default: `false`<br/>values: `false`,`true` | Yes | Enables Dapper as a thin wrapper for the generated code. For more information, please refer to the [Dapper documentation](https://github.com/DapperLib/Dapper). |
1616
| overrideDapperVersion | default:<br/> `2.1.35`<br/>values: The desired Dapper version | Yes | If `useDapper` is set to `true`, this option allows you to override the version of Dapper to be used. |
17-
[comment]: <> (do not edit - auto-generated by CI)
1817
# Quickstart
1918
## Configuration
2019
```yaml
@@ -51,7 +50,6 @@ sql:
5150
## Examples
5251
All of the examples can be found in [here](/docs/__Examples.md).
5352
# Contributing
54-
5553
## Local plugin development
5654
### Prerequisites
5755
Make sure that the following applications are installed and added to your path.

docs/02_Quickstart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
[comment]: <> (do not edit - auto-generated by CI)
21
# Quickstart
2+
**This section was auto-generated by generate_quickstart.sh**
33
## Configuration
44
```yaml
55
version: "2"

docs/03_Contributing.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Contributing
2-
32
## Local plugin development
43
### Prerequisites
54
Make sure that the following applications are installed and added to your path.

docs/__Examples.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
[comment]: <> (do not edit - auto-generated by CI)
21
# Examples
2+
**This section was auto-generated by generate_examples.sh**
3+
34
## Engine `postgresql`: [../NpgsqlExample](examples/NpgsqlExample)
45

56
### [Schema](../examples/config/postgresql/schema.sql) | [Queries](../examples/config/postgresql/query.sql) | [End2End Test](../EndToEndTests/NpgsqlTester.cs)

scripts/docs/generate_examples.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
set -e
44

5+
me=$(basename "$0")
56
doc_file="docs/$1"
67

78
examples_cnt=$(yq ".sql | length" sqlc.ci.yaml)
8-
contents="[comment]: <> (do not edit - auto-generated by CI)
9-
# Examples"
9+
contents="# Examples
10+
**This section was auto-generated by ${me}**
11+
"
1012

1113
for ((i = 0 ; i < "${examples_cnt}" ; i++ )); do
1214
engine_name=$(yq ".sql[${i}].engine" sqlc.ci.yaml)

scripts/docs/generate_quickstart.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
set -e
44

5+
me=$(basename "$0")
56
doc_file="docs/$1"
7+
68
plugin_version=$(git tag | sort --version-sort | tail -n1)
79
plugin_url="https://github.com/DaredevilOSS/sqlc-gen-csharp/releases/download/${plugin_version}/sqlc-gen-csharp.wasm"
810
release_sha=$(curl -s "${plugin_url}" | shasum -a 256 | awk '{ print $1 }')
911

10-
contents="[comment]: <> (do not edit - auto-generated by CI)
11-
# Quickstart
12+
contents="# Quickstart
13+
**This section was auto-generated by ${me}**
1214
## Configuration
1315
\`\`\`yaml
1416
version: \"2\"

0 commit comments

Comments
 (0)