Skip to content

Commit 5dc353c

Browse files
Beer van der DriftBeer van der Drift
authored andcommitted
feat: initial stlc build
Stainless-Generated-From: 37fc7ee7c651c56d11cdc493c5e0edfb1234c8fb
1 parent 377c7a6 commit 5dc353c

11 files changed

Lines changed: 28 additions & 27 deletions

File tree

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,33 @@
11
name: Setup Go
2-
description: 'Sets up Go environment with private modules'
2+
description: 'Sets up Go environment'
33
inputs:
4-
stainless-api-key:
4+
go-version:
55
required: false
6-
description: the value of the STAINLESS_API_KEY secret
6+
description: version or version range of Go to use
7+
cache-dependency-path:
8+
required: false
9+
description: path to dependency files for caching
710
runs:
811
using: composite
912
steps:
10-
- uses: stainless-api/retrieve-github-access-token@1f03f929b746c5b03dcdafa2bebbb18ca5672e1a # v1.0.0
11-
if: github.repository == 'stainless-sdks/context.dev-cli'
12-
id: get_token
13-
with:
14-
repo: stainless-sdks/context.dev-go
15-
stainless-api-key: ${{ inputs.stainless-api-key }}
16-
17-
- name: Configure Git for access to the Go SDK's staging repo
18-
if: github.repository == 'stainless-sdks/context.dev-cli'
13+
- name: Verify Go SDK module is accessible
1914
shell: bash
20-
run: git config --global url."https://x-access-token:${{ steps.get_token.outputs.github_access_token }}@github.com/stainless-sdks/context.dev-go".insteadOf "https://github.com/stainless-sdks/context.dev-go"
15+
env:
16+
GO_MODULE_REPO: ${{ github.repository == 'context-dot-dev/context-dev-cli-staging' && 'context-dot-dev/context-go-sdk-staging' || 'context-dot-dev/context-go-sdk' }}
17+
run: |
18+
if ! git ls-remote --exit-code "https://github.com/${GO_MODULE_REPO}" >/dev/null 2>&1; then
19+
echo "::error::Cannot access the Go SDK module at https://github.com/${GO_MODULE_REPO}."
20+
echo "::error::If the repo is private, uncomment the 'Authenticate git for the private Go SDK repo' step in .github/workflows/ci.yml and add a GO_REPO_READ_TOKEN secret to this repo."
21+
exit 1
22+
fi
2123
2224
- name: Setup go
2325
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
2426
with:
27+
go-version: ${{ inputs.go-version }}
2528
go-version-file: ./go.mod
29+
cache-dependency-path: ${{ inputs.cache-dependency-path }}
2630

2731
- name: Bootstrap
2832
shell: bash
29-
run: ./scripts/bootstrap
33+
run: ./scripts/bootstrap

‎.stats.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
configured_endpoints: 41
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/context-dev/context.dev-2c3f4e4b357ca78c019a3aacd006e2bb8b332d4172a300ee6c46c076a216ed3f.yml
3-
openapi_spec_hash: b89be415cf6ee594b521885a9deb25ac
4-
config_hash: 0fb0ceca5946298c416cec0cca5260c7

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/charmbracelet/bubbletea v1.3.6
88
github.com/charmbracelet/lipgloss v1.1.0
99
github.com/charmbracelet/x/term v0.2.1
10-
github.com/context-dot-dev/context-go-sdk/v2 v2.11.0
10+
github.com/context-dot-dev/context-go-sdk/v2 v2.12.0
1111
github.com/goccy/go-yaml v1.18.0
1212
github.com/itchyny/json2yaml v0.1.4
1313
github.com/muesli/reflow v0.3.0

‎go.sum‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91 h1:payR
1818
github.com/charmbracelet/x/exp/golden v0.0.0-20241011142426-46044092ad91/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
1919
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
2020
github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg=
21-
github.com/context-dot-dev/context-go-sdk/v2 v2.11.0 h1:SsEX/lciOcEwANUhkEs6iJoEtSD2oZmnmslHtlio/Cc=
22-
github.com/context-dot-dev/context-go-sdk/v2 v2.11.0/go.mod h1:CvRANWLP0FHj5XyUwzEVX79ujdwr/2Jy375UVzKNQm8=
21+
github.com/context-dot-dev/context-go-sdk/v2 v2.12.0 h1:cA6jbkTtWal7kfdGDi0Km1ABgAD4sjmKayD8HttGil0=
22+
github.com/context-dot-dev/context-go-sdk/v2 v2.12.0/go.mod h1:CvRANWLP0FHj5XyUwzEVX79ujdwr/2Jy375UVzKNQm8=
2323
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
2424
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
2525
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

‎release-please-config.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": {
33
".": {}
44
},
5-
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
5+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
66
"include-v-in-tag": true,
77
"include-component-in-tag": false,
88
"versioning": "prerelease",

‎scripts/build‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55
cd "$(dirname "$0")/.."
66

77
# Mark the necessary Go modules as private to avoid Go's proxy
8-
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/stainless-sdks/context.dev-go/v2"
8+
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/context-dot-dev/context-go-sdk-staging/v2"
99

1010
echo "==> Building context-dev"
1111
go build ./cmd/context-dev

‎scripts/link‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55
cd "$(dirname "$0")/.."
66

77
# Mark the necessary Go modules as private to avoid Go's proxy
8-
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/stainless-sdks/context.dev-go/v2"
8+
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/context-dot-dev/context-go-sdk-staging/v2"
99

1010
REPLACEMENT="${1:-"../context.dev-go"}"
1111
echo "==> Replacing Go SDK with $REPLACEMENT"

‎scripts/lint‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55
cd "$(dirname "$0")/.."
66

77
# Mark the necessary Go modules as private to avoid Go's proxy
8-
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/stainless-sdks/context.dev-go/v2"
8+
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/context-dot-dev/context-go-sdk-staging/v2"
99

1010
echo "==> Running Go build"
1111
go build ./...

‎scripts/run‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set -euo pipefail
55
cd "$(dirname "$0")/.."
66

77
# Mark the necessary Go modules as private to avoid Go's proxy
8-
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/stainless-sdks/context.dev-go/v2"
8+
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/context-dot-dev/context-go-sdk-staging/v2"
99

1010
go run ./cmd/context-dev "$@"

‎scripts/test‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -euo pipefail
55
cd "$(dirname "$0")/.."
66

77
# Mark the necessary Go modules as private to avoid Go's proxy
8-
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/stainless-sdks/context.dev-go/v2"
8+
export GOPRIVATE="${GOPRIVATE:+$GOPRIVATE,}github.com/context-dot-dev/context-go-sdk/v2,github.com/context-dot-dev/context-go-sdk-staging/v2"
99

1010

1111

0 commit comments

Comments
 (0)