Skip to content

Commit

Permalink
Upgrade to Golang 1.21, externalize mage
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Apr 8, 2024
1 parent 30efec1 commit 44a9ba2
Show file tree
Hide file tree
Showing 31 changed files with 2,101 additions and 1,628 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/go-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: Build

on:
pull_request:
branches: [ 'main', 'release-*' ]

jobs:
build:
uses: knative/actions/.github/workflows/go-build.yaml@main
12 changes: 12 additions & 0 deletions .github/workflows/go-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Test

on:
push:
branches: [ 'main', 'release-*' ]

pull_request:
branches: [ 'main', 'release-*' ]

jobs:
test:
uses: knative/actions/.github/workflows/go-test.yaml@main
18 changes: 0 additions & 18 deletions .github/workflows/golangci-lint.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/mage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ name: Mage

on:
push:
tags:
- v*
branches: [ 'main', 'master', 'release-*' ]
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

env:
FORCE_COLOR: true

jobs:

build:
name: Build
name: Go
runs-on: ubuntu-latest
strategy:
matrix:
go-version:
- '1.17'
- '1.16'
- '1.22'
- '1.21'
steps:

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Build & Test
- name: Run mage
run: ./mage
env:
FORCE_COLOR: true
10 changes: 10 additions & 0 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Code Style

on:
pull_request:
branches: [ 'main', 'release-*' ]

jobs:

style:
uses: knative/actions/.github/workflows/style.yaml@main
3 changes: 3 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ linters:
- maligned
- interfacer
- golint
- exhaustruct
- containedctx
- depguard

issues:
exclude-rules:
Expand Down
36 changes: 0 additions & 36 deletions Magefile.go

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/deviate/main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main // nolint:testpackage
package main

import (
"bytes"
Expand Down
112 changes: 95 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,28 +1,106 @@
module github.com/cardil/deviate

go 1.16
go 1.21

require (
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d
github.com/cli/cli/v2 v2.2.1-0.20211122114001-a3940020f938
github.com/fatih/color v1.13.0
github.com/go-git/go-billy/v5 v5.3.1
github.com/go-git/go-git/v5 v5.4.2
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
github.com/cli/cli/v2 v2.46.0
github.com/fatih/color v1.14.1
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-git/go-git/v5 v5.12.0
github.com/kelseyhightower/envconfig v1.4.0
github.com/magefile/mage v1.11.0
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.2.1
github.com/wavesoftware/go-magetasks v0.6.0
github.com/xanzy/ssh-agent v0.3.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
github.com/spf13/cobra v1.8.0
github.com/xanzy/ssh-agent v0.3.3
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.0.3
)

// indirect deps
require (
github.com/google/go-containerregistry v0.7.0 // indirect
github.com/stretchr/testify v1.7.1-0.20210427113832-6241f9ab9942 // indirect
golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c // indirect
google.golang.org/genproto v0.0.0-20211116182654-e63d96a377c4 // indirect
gopkg.in/ini.v1 v1.64.0 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
github.com/MakeNowJust/heredoc v1.0.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/alecthomas/chroma/v2 v2.8.0 // indirect
github.com/alessio/shellescape v1.4.2 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/briandowns/spinner v1.18.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/charmbracelet/glamour v0.7.0 // indirect
github.com/charmbracelet/lipgloss v0.5.0 // indirect
github.com/cli/browser v1.3.0 // indirect
github.com/cli/go-gh/v2 v2.6.0 // indirect
github.com/cli/oauth v1.0.1 // indirect
github.com/cli/safeexec v1.0.1 // indirect
github.com/cli/shurcooL-graphql v0.0.4 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dlclark/regexp2 v1.4.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/gdamore/tcell/v2 v2.5.4 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gorilla/websocket v1.5.1 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/henvic/httpretty v0.1.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/itchyny/gojq v0.12.15 // indirect
github.com/itchyny/timefmt-go v0.1.5 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/joho/godotenv v1.5.1 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/microcosm-cc/bluemonday v1.0.26 // indirect
github.com/microsoft/dev-tunnels v0.0.25 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.15.2 // indirect
github.com/muhammadmuzzammil1998/jsonc v0.0.0-20201229145248-615b0916ca38 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rivo/tview v0.0.0-20221029100920-c4a7e501810d // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rodaine/table v1.0.1 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/shurcooL/githubv4 v0.0.0-20230704064427-599ae7bbf278 // indirect
github.com/shurcooL/graphql v0.0.0-20230722043721-ed46e5a46466 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/stretchr/testify v1.9.0 // indirect
github.com/thlib/go-timezone-local v0.0.0-20210907160436-ef149e42d28e // indirect
github.com/yuin/goldmark v1.5.4 // indirect
github.com/yuin/goldmark-emoji v1.0.2 // indirect
github.com/zalando/go-keyring v0.2.4 // indirect
golang.org/x/crypto v0.22.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/net v0.24.0 // indirect
golang.org/x/sync v0.7.0 // indirect
golang.org/x/sys v0.19.0 // indirect
golang.org/x/term v0.19.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.20.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/grpc v1.56.3 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
)
Loading

0 comments on commit 44a9ba2

Please sign in to comment.