Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: prepare initial release #11

Merged
merged 5 commits into from
Jul 26, 2024
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
15 changes: 0 additions & 15 deletions .github/workflows/commitlint.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/go-ci-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Go linter
on:
workflow_dispatch:
push:
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
golangci:
name: Golangci-lint
runs-on: ubuntu-latest
env:
GO_VERSION: '~1.22'
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.56
args: --config .golang-ci.yml
github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-pr-check
20 changes: 20 additions & 0 deletions .github/workflows/go-ci-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Go unit tests
on:
workflow_dispatch:
push:
pull_request:
env:
GO_VERSION: '~1.22'
jobs:
golangci:
name: Go Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Test
run: make test
27 changes: 0 additions & 27 deletions .github/workflows/lint.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Test and coverage

on: [push, pull_request]
on:
workflow_dispatch:


jobs:
test:
strategy:
matrix:
go-version: [1.19.x]
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions .golang-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ linters-settings:
- singleCaseSwitch
- hugeParam
- appendCombine
- sloppyReassign
- whyNoLint
funlen:
lines: 100
statements: 52
Expand Down
9 changes: 0 additions & 9 deletions cmd/util.go

This file was deleted.

5 changes: 0 additions & 5 deletions commitlint.config.js

This file was deleted.

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/gchiesa/ska

go 1.21
go 1.22

toolchain go1.22.0

Expand Down
4 changes: 2 additions & 2 deletions internal/tui/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (m *Model) Init() tea.Cmd {
}

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
var cmds []tea.Cmd = make([]tea.Cmd, len(m.inputs))
var cmds = make([]tea.Cmd, len(m.inputs))

for i := range m.inputs {
m.inputs[i], cmds[i] = m.inputs[i].Update(msg)
Expand Down Expand Up @@ -84,7 +84,7 @@ func (m *Model) View() string {
builder.WriteRune('\n')
builder.WriteString(helpStyle.Render(" ↑, ↓: navigate, enter: confirm, ctrl+c: quit, ctrl+s: save"))
if m.err != nil {
builder.WriteString(errorStyle.Render(fmt.Sprintf("%s", m.err.Error())))
builder.WriteString(errorStyle.Render(m.err.Error()))
}
return builder.String()
}
Expand Down
2 changes: 0 additions & 2 deletions internal/tui/type.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
package tui

import (
"github.com/charmbracelet/bubbles/cursor"
"github.com/charmbracelet/bubbles/textinput"
)

type Model struct {
header string
focusIndex int
inputs []textinput.Model
cursorMode cursor.Mode
err error
exitWithCtrlC bool
}
2 changes: 1 addition & 1 deletion pkg/skaffolder/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type SkaCreate struct {
Log *log.Entry
}

func NewSkaCreate(templateURI string, destinationPath string, variables map[string]string) *SkaCreate {
func NewSkaCreate(templateURI, destinationPath string, variables map[string]string) *SkaCreate {
logCtx := log.WithFields(log.Fields{
"pkg": "skaffolder",
})
Expand Down
1 change: 0 additions & 1 deletion pkg/skaffolder/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ func (s *SkaUpdate) Update() error {

// check if interactive mode is required
if interactiveService.ShouldRun() {

// overrides the variables from remote service with already saved variables
interactiveService.SetDefaults(mapInterfaceToString(vars))

Expand Down
Loading