Skip to content

Commit

Permalink
Merge pull request #110 from essentialkaos/develop
Browse files Browse the repository at this point in the history
Version 1.0.0
  • Loading branch information
andyone authored Mar 19, 2024
2 parents a331d2d + 3578d40 commit 39a575c
Show file tree
Hide file tree
Showing 13 changed files with 640 additions and 254 deletions.
42 changes: 25 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
branches: [master, develop]
pull_request:
branches: [master]
workflow_dispatch:
inputs:
force_run:
description: 'Force workflow run'
required: true
type: choice
options: [yes, no]

permissions:
actions: read
Expand All @@ -15,39 +22,40 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
SRC_DIR: src/github.com/${{ github.repository }}

jobs:
Go:
name: Go
runs-on: ubuntu-latest

strategy:
matrix:
go: [ '1.19.x', '1.20.x' ]
go: [ '1.21.x', '1.22.x' ]

steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Checkout
uses: actions/checkout@v3
with:
path: ${{env.SRC_DIR}}

- name: Download dependencies
working-directory: ${{env.SRC_DIR}}
run: make deps

- name: Build binary
working-directory: ${{env.SRC_DIR}}
run: make all

- name: Do tests
working-directory: ${{env.SRC_DIR}}
run: |
./knfgen testdata/test1.source | sha1sum | grep -q 'dbfffea813d04de4d838f1877b54fc53cee73616'
./knfgen testdata/test2.source | sha1sum | grep -q 'dbfffea813d04de4d838f1877b54fc53cee73616'
Typos:
name: Typos
runs-on: ubuntu-latest

needs: Go

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check spelling
continue-on-error: true
uses: crate-ci/typos@master
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: go

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[files]
extend-exclude = ["go.sum"]
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

#### From source

To build the `knfgen` from scratch, make sure you have a working Go 1.19+ workspace ([instructions](https://golang.org/doc/install)), then:
To build the `knfgen` from scratch, make sure you have a working Go 1.21+ workspace ([instructions](https://go.dev/doc/install)), then:

```
go install github.com/essentialkaos/knfgen
go install github.com/essentialkaos/knfgen@latest
```

#### Prebuilt binaries
Expand All @@ -41,7 +41,8 @@ Usage: knfgen {options} file
Options
--separators, -s Add new lines between sections
--separators, -S Add new lines between sections
--united, -U Generate code for united configuration
--no-color, -nc Disable colors in output
--help, -h Show this help message
--version, -v Show version
Expand Down
Loading

0 comments on commit 39a575c

Please sign in to comment.