generated from templates/go-generic
chore: project setup
This commit is contained in:
parent
28e228ba94
commit
f8441a48b7
6 changed files with 25 additions and 15 deletions
|
@ -11,9 +11,6 @@ jobs:
|
||||||
test:
|
test:
|
||||||
if: ${{ ! github.event.pull_request.draft }}
|
if: ${{ ! github.event.pull_request.draft }}
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
env:
|
|
||||||
GO_TEST_VERBOSE: "1"
|
|
||||||
GO_TEST_COVER: "1"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
|
@ -22,5 +19,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
target: test
|
target: test
|
||||||
env:
|
env:
|
||||||
PROJECT_TEST_VERBOSE: "1"
|
GATOR_TEST_VERBOSE: "1"
|
||||||
PROJECT_TEST_COVER: "1"
|
GATOR_TEST_COVER: "1"
|
||||||
|
|
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# gator
|
||||||
|
|
||||||
|
Gator is an RSS feed aggregator for the command line.
|
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
module codeflow.dananglin.me.uk/apollo/gator
|
||||||
|
|
||||||
|
go 1.23.1
|
5
magefiles/go.mod
Normal file
5
magefiles/go.mod
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
module codeflow.dananglin.me.uk/apollo/gator/magefiles
|
||||||
|
|
||||||
|
go 1.23.1
|
||||||
|
|
||||||
|
require github.com/magefile/mage v1.15.0
|
2
magefiles/go.sum
Normal file
2
magefiles/go.sum
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
|
||||||
|
github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
|
|
@ -14,13 +14,13 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
app = "binary"
|
app = "gator"
|
||||||
defaultInstallPrefix = "/usr/local"
|
defaultInstallPrefix = "/usr/local"
|
||||||
envInstallPrefix = "PROJECT_INSTALL_PREFIX"
|
envInstallPrefix = "GATOR_INSTALL_PREFIX"
|
||||||
envTestVerbose = "PROJECT_TEST_VERBOSE"
|
envTestVerbose = "GATOR_TEST_VERBOSE"
|
||||||
envTestCover = "PROJECT_TEST_COVER"
|
envTestCover = "GATOR_TEST_COVER"
|
||||||
envBuildRebuildAll = "PROJECT_BUILD_REBUILD_ALL"
|
envBuildRebuildAll = "GATOR_BUILD_REBUILD_ALL"
|
||||||
envBuildVerbose = "PROJECT_BUILD_VERBOSE"
|
envBuildVerbose = "GATOR_BUILD_VERBOSE"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -29,8 +29,8 @@ var (
|
||||||
)
|
)
|
||||||
|
|
||||||
// Test run the go tests.
|
// Test run the go tests.
|
||||||
// To enable verbose mode set PROJECT_TEST_VERBOSE=1.
|
// To enable verbose mode set GATOR_TEST_VERBOSE=1.
|
||||||
// To enable coverage mode set PROJECT_TEST_COVER=1.
|
// To enable coverage mode set GATOR_TEST_COVER=1.
|
||||||
func Test() error {
|
func Test() error {
|
||||||
goTest := sh.RunCmd("go", "test")
|
goTest := sh.RunCmd("go", "test")
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@ func Lint() error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build build the executable.
|
// Build build the executable.
|
||||||
// To rebuild packages that are already up-to-date set PROJECT_BUILD_REBUILD_ALL=1
|
// To rebuild packages that are already up-to-date set GATOR_BUILD_REBUILD_ALL=1
|
||||||
// To enable verbose mode set PROJECT_BUILD_VERBOSE=1
|
// To enable verbose mode set GATOR_BUILD_VERBOSE=1
|
||||||
func Build() error {
|
func Build() error {
|
||||||
main := "main.go"
|
main := "main.go"
|
||||||
flags := ldflags()
|
flags := ldflags()
|
||||||
|
|
Loading…
Reference in a new issue