Skip to content

Commit 3748f94

Browse files
ci: PLT-442: Test with no version provided
1 parent f779156 commit 3748f94

File tree

2 files changed

+1
-43
lines changed

2 files changed

+1
-43
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
workflow_dispatch:
8-
inputs:
9-
version:
10-
description: Version
11-
type: string
12-
required: true
137

148
jobs:
159
fern-generate-pr:
@@ -27,41 +21,7 @@ jobs:
2721
- name: Check Fern API is valid
2822
run: fern check
2923

30-
- name: Get version from label-studio-sdk
31-
id: sdk-version
32-
if: inputs.version == ''
33-
uses: actions/github-script@v7
34-
with:
35-
github-token: ${{ secrets.GIT_PAT }}
36-
script: |
37-
const { repo, owner } = context.repo;
38-
const sdk_repo = 'label-studio-sdk';
39-
const pyProjectPath = 'pyproject.toml';
40-
41-
const {data: sdk_repo_data} = await github.rest.repos.get({
42-
owner,
43-
repo: sdk_repo,
44-
});
45-
const {data: commit} = await github.rest.repos.getCommit({
46-
owner,
47-
repo: sdk_repo,
48-
ref: sdk_repo_data.default_branch,
49-
});
50-
const pyprojectBlob = await github.rest.repos.getContent({
51-
owner,
52-
repo: sdk_repo,
53-
ref: commit.sha,
54-
path: pyProjectPath,
55-
});
56-
const pyproject = Buffer.from(pyprojectBlob.data.content, pyprojectBlob.data.encoding).toString("utf8");
57-
const versionMatch = pyproject.match(/version = "(?<version>[\.a-z0-9]+)"/);
58-
if (versionMatch && versionMatch.groups.version) {
59-
core.setOutput('version', versionMatch.groups.version);
60-
} else {
61-
throw `Version not found in ${pyprojectBlob.url}`
62-
}
63-
6424
- name: Publish Python SDK PR
6525
env:
6626
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
67-
run: fern generate --group python-sdk-staging --version ${{ inputs.version || steps.sdk-version.outputs.version }} --log-level debug
27+
run: fern generate --group python-sdk-staging --log-level debug

fern/generators.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ groups:
1010
- public
1111
generators:
1212
- name: fernapi/fern-python-sdk
13-
version: 2.14.0-rc0
1413
output:
1514
location: pypi
1615
package-name: label-studio-sdk
@@ -54,7 +53,6 @@ groups:
5453
- public
5554
generators:
5655
- name: fernapi/fern-python-sdk
57-
version: 2.14.0-rc0
5856
output:
5957
location: local-file-system
6058
path: ../label_studio_sdk

0 commit comments

Comments
 (0)