Skip to content

Commit 2ac0f5f

Browse files
committed
update group generate instructions for publishing guides
1 parent 85efe4c commit 2ac0f5f

File tree

6 files changed

+36
-191
lines changed

6 files changed

+36
-191
lines changed

fern/products/sdks/overview/csharp/publishing-to-nuget.mdx

Lines changed: 26 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,66 +18,39 @@ you'll have a versioned package published on NuGet.
1818

1919
<Steps>
2020

21-
<Step title="Run `fern add <generator>`">
21+
<Step title="Configure `output` location">
2222

23-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
23+
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `nuget` to indicate that Fern should publish your package directly to the NuGet registry:
2424

25-
Add a new generator to `generators.yml`:
25+
```yaml {6-7}
26+
groups:
27+
csharp-sdk:
28+
generators:
29+
- name: fernapi/fern-csharp-sdk
30+
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
31+
output:
32+
location: nuget
2633

34+
```
35+
</Step>
2736

28-
```bash
29-
fern add fern-csharp-sdk --group csharp-sdk
30-
```
31-
32-
Once the command completes, you'll see a new group created in your `generators.yml`:
33-
34-
```yaml {3-9}
35-
groups:
36-
...
37-
csharp-sdk:
38-
generators:
39-
- name: fernapi/fern-csharp-sdk
40-
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
41-
output:
42-
location: local-file-system
43-
path: ../sdks/csharp
44-
```
45-
46-
</Step>
47-
48-
<Step title="Configure `output` location">
49-
50-
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `nuget` to indicate that Fern should publish your package directly to the NuGet registry:
51-
52-
```yaml {6-7}
53-
groups:
54-
csharp-sdk:
55-
generators:
56-
- name: fernapi/fern-csharp-sdk
57-
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
58-
output:
59-
location: nuget
60-
61-
```
62-
</Step>
63-
64-
<Step title="Add a unique package name">
37+
<Step title="Add a unique package name">
6538

66-
Your package name must be unique in the NuGet repository, otherwise publishing your SDK to NuGet will fail. Update your package name if you haven't done so already:
39+
Your package name must be unique in the NuGet repository, otherwise publishing your SDK to NuGet will fail. Update your package name if you haven't done so already:
6740

6841

69-
```yaml {8}
70-
groups:
71-
csharp-sdk:
72-
generators:
73-
- name: fernapi/fern-csharp-sdk
74-
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
75-
output:
76-
location: nuget
77-
package-name: your-package-name
78-
```
79-
80-
</Step>
42+
```yaml {8}
43+
groups:
44+
csharp-sdk:
45+
generators:
46+
- name: fernapi/fern-csharp-sdk
47+
version: <Markdown src="/snippets/version-number-csharp.mdx"/>
48+
output:
49+
location: nuget
50+
package-name: your-package-name
51+
```
52+
53+
</Step>
8154
<Step title="Configure `client-class-name`">
8255

8356
The `client-class-name` option controls the name of the generated client. This is the name customers use to import your SDK (`import { your-client-name } from 'your-package-name';`).

fern/products/sdks/overview/go/publishing-to-go-package-manager.mdx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,6 @@ you'll have a versioned package published on pkg.go.dev.
2525

2626
<Steps>
2727

28-
<Step title="Run `fern add <generator>`">
29-
30-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
31-
32-
Add a new generator to `generators.yml`:
33-
34-
35-
```bash
36-
fern add fern-go-sdk --group go-sdk
37-
```
38-
39-
Once the command completes, you'll see a new group created in your `generators.yml`:
40-
41-
```yaml {2-11}
42-
groups:
43-
go-sdk:
44-
generators:
45-
- name: fernapi/fern-go-sdk
46-
version: <Markdown src="/snippets/version-number-go.mdx"/>
47-
output:
48-
location: local-file-system
49-
path: ../sdks/go
50-
config:
51-
module:
52-
path: sdk
53-
```
54-
55-
</Step>
56-
5728
<Step title="Configure `output` location">
5829

5930
Go publishes via Git repositories, so remove the auto-generated

fern/products/sdks/overview/java/publishing-to-maven-central.mdx

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,6 @@ page, you'll have a versioned package published on Maven Central.
1313

1414
<Steps>
1515

16-
<Step title="Run `fern add <generator>`">
17-
18-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
19-
20-
Add a new generator to `generators.yml`:
21-
22-
23-
```bash
24-
fern add fern-java-sdk --group java-sdk
25-
```
26-
27-
Once the command completes, you'll see a new group created in your `generators.yml`:
28-
29-
```yaml {2-8}
30-
groups:
31-
java-sdk:
32-
generators:
33-
- name: fernapi/fern-java-sdk
34-
version: <Markdown src="/snippets/version-number-java.mdx"/>
35-
output:
36-
location: local-file-system
37-
path: ../sdks/java/src/main/java/
38-
```
39-
40-
</Step>
41-
4216
<Step title="Configure `output` location">
4317

4418
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `maven` to indicate that Fern should publish your package directly to the Maven Central registry:
@@ -167,12 +141,20 @@ groups:
167141
1. To export your secret key, run:
168142

169143
```sh
170-
gpg --export-secret-keys --armor KEY_ID
144+
gpg --export-secret-keys --armor YOUR_KEY_ID
171145
```
172146

173-
Be sure to replace `KEY_ID` with the key ID of the key you want to export.
147+
Be sure to replace `YOUR_KEY_ID` with the key ID of the key you want to export.
174148

175149
<Info>More information is available on [Maven Central's GPG validation page](https://central.sonatype.org/publish/requirements/gpg/).</Info>
150+
1. Finally, upload your key to public key servers so Maven Central can access the signature:
151+
152+
```bash
153+
# Upload to multiple key servers
154+
gpg --keyserver keyserver.ubuntu.com --send-keys YOUR_KEY_ID
155+
gpg --keyserver keys.openpgp.org --send-keys YOUR_KEY_ID
156+
gpg --keyserver pgp.mit.edu --send-keys YOUR_KEY_ID
157+
```
176158
</Step>
177159
<Step title="Configure GPG Signature">
178160

fern/products/sdks/overview/php/publishing-to-packagist.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,6 @@ you'll have a versioned package published on Packagist.
1717

1818
<Steps>
1919

20-
<Step title="Run `fern add <generator>`">
21-
22-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
23-
24-
Add a new generator to `generators.yml`:
25-
26-
27-
```bash
28-
fern add fern-php-sdk --group php-sdk
29-
```
30-
31-
Once the command completes, you'll see a new group created in your `generators.yml`:
32-
33-
```yaml {2-8}
34-
groups:
35-
php-sdk:
36-
generators:
37-
- name: fernapi/fern-php-sdk
38-
version: <Markdown src="/snippets/version-number.mdx"/>
39-
output:
40-
location: local-file-system
41-
path: ../sdks/php
42-
```
43-
44-
</Step>
45-
46-
4720
<Step title="Add repository location">
4821

4922
PHP publishes via Git repositories, so remove the auto-generated `output`, `location`, and `path` fields. Instead, add the path to your GitHub repository:

fern/products/sdks/overview/python/publishing-to-pypi.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,6 @@ you'll have a versioned package published on PyPI.
1717

1818
<Steps>
1919

20-
<Step title="Run `fern add <generator>`">
21-
22-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
23-
24-
Add a new generator to `generators.yml`:
25-
26-
27-
```bash
28-
fern add fern-python-sdk --group python-sdk
29-
```
30-
31-
Once the command completes, you'll see a new group created in your `generators.yml`:
32-
33-
```yaml {3-9}
34-
groups:
35-
...
36-
python-sdk:
37-
generators:
38-
- name: fernapi/fern-python-sdk
39-
version: <Markdown src="/snippets/version-number-python.mdx"/>
40-
output:
41-
location: local-file-system
42-
path: ../sdks/python
43-
```
44-
45-
</Step>
46-
4720
<Step title="Configure `output` location">
4821

4922
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `pypi` to indicate that Fern should publish your package directly to the PyPI registry:

fern/products/sdks/overview/ruby/publishing-to-rubygems.mdx

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,6 @@ you'll have a versioned package published on RubyGems.
1313

1414
<Steps>
1515

16-
<Step title="Run `fern add <generator>`">
17-
18-
Navigate to your `generators.yml` on your local machine. Your `generators.yml` lives inside of your `fern` folder and contains all the configuration for your Fern generators.
19-
20-
Add a new generator to `generators.yml`:
21-
22-
23-
```bash
24-
fern add fern-ruby-sdk --group ruby-sdk
25-
```
26-
27-
Once the command completes, you'll see a new group created in your `generators.yml`:
28-
29-
```yaml {3-9}
30-
groups:
31-
...
32-
ruby-sdk:
33-
generators:
34-
- name: fernapi/fern-ruby-sdk
35-
version: <Markdown src="/snippets/version-number-ruby.mdx"/>
36-
output:
37-
location: local-file-system
38-
path: ../sdks/ruby
39-
```
40-
41-
</Step>
42-
4316
<Step title="Configure `output` location">
4417

4518
Next, change the output location in `generators.yml` from `local-file-system` (the default) to `pypi` to indicate that Fern should publish your package directly to the PyPI registry:

0 commit comments

Comments
 (0)