Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.11
version: v2.14
args: --timeout=5m

- name: Run tests
Expand Down Expand Up @@ -170,10 +170,10 @@ jobs:
shell: bash
env:
CLI_TEST_MODIFY_CERT_STORE: '1'
run: GOEXPERIMENT=jsonv2 go test -v -count=1 -timeout 3m -run TestWindows ./internal/legacy/
run: go test -v -count=1 -timeout 3m -run TestWindows ./internal/legacy/

# Reading the certificate store happens before every legacy command.
- name: Measure building the CA bundle
if: always()
shell: bash
run: GOEXPERIMENT=jsonv2 go test -run '^$' -bench BenchmarkWindows -benchmem ./internal/legacy/
run: go test -run '^$' -bench BenchmarkWindows -benchmem ./internal/legacy/
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
stages:
- test

image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/cimg/go:1.25
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/cimg/go:1.27

workflow:
auto_cancel:
Expand Down Expand Up @@ -40,7 +40,7 @@ test:
golangci-lint:
stage: test
extends: .go-setup
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v2.4
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/golangci/golangci-lint:v2.14
script: golangci-lint run --timeout 0 --verbose

legacy-php:
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Run tests:
```bash
make test
# or directly:
GOEXPERIMENT=jsonv2 go test -v -race -cover -count=1 ./...
go test -v -race -cover -count=1 ./...
```

Run linters:
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ endif
PHP_VERSION=$(PHP_VERSION) goreleaser release --clean

.PHONY: test
# "We encourage users of encoding/json to test their programs with GOEXPERIMENT=jsonv2 enabled" (https://tip.golang.org/doc/go1.25)
test: ## Run unit tests (excludes integration tests)
GOEXPERIMENT=jsonv2 go test -v -race -cover -count=1 $$(go list ./... | grep -v /integration-tests)
go test -v -race -cover -count=1 $$(go list ./... | grep -v /integration-tests)

.PHONY: integration-test
integration-test: single ## Run integration tests (requires built CLI)
cd integration-tests && GOEXPERIMENT=jsonv2 go test -v -count=1 ./...
cd integration-tests && go test -v -count=1 ./...

.PHONY: lint
lint: lint-gomod lint-golangci ## Run linters.
Expand Down
7 changes: 0 additions & 7 deletions cmd/platform/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/symfony-cli/terminal"

"github.com/upsun/cli/commands"
"github.com/upsun/cli/internal/certs"
"github.com/upsun/cli/internal/config"
)

Expand All @@ -27,12 +26,6 @@ func main() {
os.Exit(1)
}

// Trust the same certificates as the legacy CLI. This is not fatal: the
// system certificates are used instead, as they were before.
if err := certs.UseEnvCertFile(); err != nil {
fmt.Fprintln(os.Stderr, "Warning: "+err.Error())
}

// When Cobra starts, load Viper config from the environment.
cobra.OnInitialize(func() {
viper.SetEnvPrefix(strings.TrimSuffix(cnf.Application.EnvPrefix, "_"))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/upsun/cli

go 1.26.2
go 1.27.1

require (
github.com/AlecAivazis/survey/v2 v2.3.7
Expand Down
64 changes: 0 additions & 64 deletions internal/certs/certs.go

This file was deleted.

71 changes: 0 additions & 71 deletions internal/certs/certs_test.go

This file was deleted.

3 changes: 1 addition & 2 deletions internal/init/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ func RunAIConfig(
yamlContent := strings.TrimSpace(apiOutput.ConfigYAML)

// Check if stdout is a terminal and supports color
// G115: file descriptors fit comfortably in an int on all supported platforms.
if f, ok := stdout.(*os.File); ok && term.IsTerminal(int(f.Fd())) { //nolint:gosec
if f, ok := stdout.(*os.File); ok && term.IsTerminal(int(f.Fd())) {
if err := quick.Highlight(stdout, yamlContent+"\n", "yaml", "terminal", "bw"); err != nil {
// Fall back to plain text if highlighting fails
fmt.Fprintln(stdout, yamlContent)
Expand Down
Loading