From b2d6806f3f308feb465d7c1fec2d800e78fb7bc9 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Tue, 30 Jul 2019 12:12:21 -0400 Subject: [PATCH] init --- .gitignore | 29 ++++++++++++++++++ .goreleaser.yml.plush | 28 ++++++++++++++++++ LICENSE | 21 +++++++++++++ Makefile | 61 ++++++++++++++++++++++++++++++++++++++ azure-pipelines.yml | 65 +++++++++++++++++++++++++++++++++++++++++ azure-tests.yml | 19 ++++++++++++ go.mod | 3 ++ pkger/cmd/pkger/go.mod | 3 ++ pkger/cmd/pkger/main.go | 7 +++++ version.go | 4 +++ 10 files changed, 240 insertions(+) create mode 100644 .gitignore create mode 100644 .goreleaser.yml.plush create mode 100644 LICENSE create mode 100644 Makefile create mode 100644 azure-pipelines.yml create mode 100644 azure-tests.yml create mode 100644 go.mod create mode 100644 pkger/cmd/pkger/go.mod create mode 100644 pkger/cmd/pkger/main.go create mode 100644 version.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3689718 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +*.log +.DS_Store +doc +tmp +pkg +*.gem +*.pid +coverage +coverage.data +build/* +*.pbxuser +*.mode1v3 +.svn +profile +.console_history +.sass-cache/* +.rake_tasks~ +*.log.lck +solr/ +.jhw-cache/ +jhw.* +*.sublime* +node_modules/ +dist/ +generated/ +.vendor/ +bin/* +gin-bin +.idea/ diff --git a/.goreleaser.yml.plush b/.goreleaser.yml.plush new file mode 100644 index 0000000..dba55bc --- /dev/null +++ b/.goreleaser.yml.plush @@ -0,0 +1,28 @@ +builds: +- + goos: + - darwin + - linux + - windows + env: + - CGO_ENABLED=0 + main: ./pkger/cmd/pkger/main.go + +checksum: + name_template: 'checksums.txt' + +snapshot: + name_template: "{{ .Tag }}-next" + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +<%= if (brew) { %> +brews: + github: + owner: markbates + name: homebrew-tap +<% } %> diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..649efd4 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Mark Bates + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ae2f5d1 --- /dev/null +++ b/Makefile @@ -0,0 +1,61 @@ +TAGS ?= "" +GO_BIN ?= "go" + +install: + $(GO_BIN) install -tags ${TAGS} -v ./pkger/cmd/pkger + make tidy + +tidy: +ifeq ($(GO111MODULE),on) + $(GO_BIN) mod tidy +else + echo skipping go mod tidy +endif + +deps: + $(GO_BIN) get -tags ${TAGS} -t ./... + make tidy + +build: + $(GO_BIN) build -v . + make tidy + +test: + $(GO_BIN) test -cover -tags ${TAGS} ./... + make tidy + +ci-deps: + $(GO_BIN) get -tags ${TAGS} -t ./... + +ci-test: + $(GO_BIN) test -tags ${TAGS} -race ./... + +lint: + go get github.com/golangci/golangci-lint/cmd/golangci-lint + golangci-lint run --enable-all + make tidy + +update: +ifeq ($(GO111MODULE),on) + rm go.* + $(GO_BIN) mod init + $(GO_BIN) mod tidy +else + $(GO_BIN) get -u -tags ${TAGS} +endif + make test + make install + make tidy + +release-test: + $(GO_BIN) test -tags ${TAGS} -race ./... + make tidy + +release: + $(GO_BIN) get github.com/gobuffalo/release + make tidy + release -y -f version.go --skip-packr + make tidy + + + diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..bfda076 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,65 @@ +variables: + GOBIN: "$(GOPATH)/bin" # Go binaries path + GOPATH: "$(system.defaultWorkingDirectory)/gopath" # Go workspace path + modulePath: "$(GOPATH)/src/github.com/$(build.repository.name)" # Path to the module"s code + +jobs: +- job: Windows + pool: + vmImage: "vs2017-win2016" + strategy: + matrix: + go 1.11 (on): + go_version: "1.11.11" + GO111MODULE: "on" + go 1.11 (off): + go_version: "1.11.11" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12.6" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12.6" + GO111MODULE: "off" + steps: + - template: azure-tests.yml + +- job: macOS + pool: + vmImage: "macOS-10.13" + strategy: + matrix: + go 1.11 (on): + go_version: "1.11.11" + GO111MODULE: "on" + go 1.11 (off): + go_version: "1.11.11" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12.6" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12.6" + GO111MODULE: "off" + steps: + - template: azure-tests.yml + +- job: Linux + pool: + vmImage: "ubuntu-16.04" + strategy: + matrix: + go 1.11 (on): + go_version: "1.11.11" + GO111MODULE: "on" + go 1.11 (off): + go_version: "1.11.11" + GO111MODULE: "off" + go 1.12 (on): + go_version: "1.12.6" + GO111MODULE: "on" + go 1.12 (off): + go_version: "1.12.6" + GO111MODULE: "off" + steps: + - template: azure-tests.yml diff --git a/azure-tests.yml b/azure-tests.yml new file mode 100644 index 0000000..eea5822 --- /dev/null +++ b/azure-tests.yml @@ -0,0 +1,19 @@ +steps: + - task: GoTool@0 + inputs: + version: $(go_version) + - task: Bash@3 + inputs: + targetType: inline + script: | + mkdir -p "$(GOBIN)" + mkdir -p "$(GOPATH)/pkg" + mkdir -p "$(modulePath)" + shopt -s extglob + mv !(gopath) "$(modulePath)" + displayName: "Setup Go Workspace" + - script: | + go get -t -v ./... + go test -race ./... + workingDirectory: "$(modulePath)" + displayName: "Tests" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2b5ac77 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/markbates/pkger + +go 1.12 diff --git a/pkger/cmd/pkger/go.mod b/pkger/cmd/pkger/go.mod new file mode 100644 index 0000000..c28bf27 --- /dev/null +++ b/pkger/cmd/pkger/go.mod @@ -0,0 +1,3 @@ +module github.com/markbates/pkger/pkger/cmd/pkger + +go 1.12 diff --git a/pkger/cmd/pkger/main.go b/pkger/cmd/pkger/main.go new file mode 100644 index 0000000..50e8d8d --- /dev/null +++ b/pkger/cmd/pkger/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("vim-go") +} diff --git a/version.go b/version.go new file mode 100644 index 0000000..6a02283 --- /dev/null +++ b/version.go @@ -0,0 +1,4 @@ +package pkger + +// Version of pkger +const Version = "v0.0.1"