Skip to content
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
9 changes: 5 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
version: 2
version: 2.1
jobs:
build:
docker:
- image: circleci/golang:1.13
- image: circleci/golang:1.16

working_directory: /go/src/github.com/warrensbox/jscheck

Expand All @@ -14,14 +14,15 @@ jobs:
- run:
command: |
set +e
echo "Building application"
go get -v -t -d ./...
go vet -tests=false ./...
go test -v ./...
mkdir -p build
go build -v -o build/jscheck
release:
docker:
- image: circleci/golang:1.13
- image: circleci/golang:1.16

working_directory: /go/src/github.com/warrensbox/jscheck

Expand All @@ -47,7 +48,7 @@ jobs:
git config user.name "warrensbox"
git tag -a ${RELEASE_VERSION} -m "Release Version"
git push origin ${RELEASE_VERSION}
curl -L https://git.io/goreleaser | VERSION=v0.123.0 bash
curl -L https://git.io/goreleaser | bash

workflows:
version: 2
Expand Down
214 changes: 40 additions & 174 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,174 +1,65 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- make clean
# you may remove this if you don't use vgo
# you may remove this if you don't need go generate
archives:
- replacements:
darwin: darwin
linux: linux
windows: windows
386: 386
amd64: amd64
name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
id: jscheck
format_overrides:
- goos: windows
format: zip
builds:
-
ldflags:
- -s -w -X "main.version={{.Env.RELEASE_VERSION}}"
main: main.go
binary: jscheck
goos:
- darwin
- linux
- windows
goarch:
- 386
- amd64
- arm
- arm64
goarm:
- 6
- 7
ignore:
- goos: windows
goarch: arm
checksum:
name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_checksums.txt'
snapshot:
name_template: "{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
builds:
# You can have multiple builds defined as a yaml list
archives:
-
# ID of the build.
# Defaults to the project name.
id: "jscheck"

# Path to project's (sub)directory containing Go code.
# This is the working directory for the Go build command(s).
# Default is `.`.
#dir: go

# Path to main.go file or main package.
# Default is `.`.
main: .

# Binary name.
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
# Default is the name of the project directory.
binary: jscheck

# Custom flags templates.
# Default is empty.
# flags:
# - -tags=dev
# - -v

# Custom asmflags templates.
# Default is empty.
# asmflags:
# - -D mysymbol
# - all=-trimpath={{.Env.GOPATH}}

# Custom gcflags templates.
# Default is empty.
# gcflags:
# - all=-trimpath={{.Env.GOPATH}}
# - ./dontoptimizeme=-N

# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -s -w -X main.build={{.Version}}

# Custom environment variables to be set during the builds.
# Default is empty.
env:
- CGO_ENABLED=0

# GOOS list to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are darwin and linux.
goos:
- windows
- linux
- darwin

# GOARCH to build for.
# For more info refer to: https://golang.org/doc/install/source#environment
# Defaults are 386 and amd64.
# goarch:
# - amd64
# - arm64

# GOARM to build for when GOARCH is arm.
# For more info refer to: https://golang.org/doc/install/source#environment
# Default is only 6.
# goarm:
# - 6
# - 7

# GOMIPS and GOMIPS64 to build when GOARCH is mips, mips64, mipsle or mips64le.
# For more info refer to: https://golang.org/doc/install/source#environment
# Default is empty.
# gomips:
# - hardfloat
# - softfloat

# List of combinations of GOOS + GOARCH + GOARM to ignore.
# Default is empty.
ignore:
- goos: darwin
goarch: 386
- goos: linux
goarch: arm
goarm: 7
# - goarm: mips64
# gomips: hardfloat

# Hooks can be used to customize the final binary,
# for example, to run generators.
# Those fields allow templates.
# Default is both hooks empty.
#hooks:
# pre: rice embed-go
# post: ./script.sh
name_template: '{{ .ProjectName }}_{{.Env.RELEASE_VERSION}}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
replacements:
darwin: darwin
linux: linux
386: 386
amd64: amd64
format_overrides:
- goos: windows
format: zip
brews:
-
# Name template of the recipe
# Name of the recipe
# Default to project name
name: jscheck

# IDs of the archives to use.
# Defaults to all.
# ids:
# - jscheck

# GOARM to specify which 32-bit arm version to use if there are multiple versions
# from the build section. Brew formulas support atm only one 32-bit version.
# Default is 6 for all artifacts or each id if there a multiple versions.
goarm: 6


# NOTE: make sure the url_template, the token and given repo (github or gitlab) owner and name are from the
# same kind. We will probably unify this in the next major version like it is done with scoop.

# Github repository to push the tap to.
github:
# GitHub/GitLab repository to push the formula to
# Gitea is not supported yet, but the support coming
tap:
owner: warrensbox
name: homebrew-tap

# OR Gitlab
# gitlab:
# owner: gitlab-user
# Reporitory to push the tap to.
# github:
# owner: warrensbox
# name: homebrew-tap

# Gitea is not supported yet, but the support coming

# Template for the url which is determined by the given Token (github or gitlab)
# Default for github is "https://github.com/<repo_owner>/<repo_name>/releases/download/{{ .Tag }}/{{ .ArtifactName }}"
# Default for gitlab is "https://gitlab.com/<repo_owner>/<repo_name>/uploads/{{ .ArtifactUploadHash }}/{{ .ArtifactName }}"
#url_template: "http://github.mycompany.com/foo/bar/releases/{{ .Tag }}/{{ .ArtifactName }}"

# Allows you to set a custom download strategy. Note that you'll need
# to implement the strategy and add it to your tap repository.
# Example: https://docs.brew.sh/Formula-Cookbook#specifying-the-download-strategy-explicitly
# Allows you to set a custom download strategy.
# Default is empty.
#download_strategy: CurlDownloadStrategy.

# Allows you to add a custom require_relative at the top of the formula template
# Default is empty
#custom_require: custom_download_strategy
#download_strategy: GitHubPrivateRepositoryReleaseDownloadStrategy

# Git author used to commit to the repository.
# Defaults are shown.
Expand All @@ -195,39 +86,14 @@ brews:
# Setting this will prevent goreleaser to actually try to commit the updated
# formula - instead, the formula file will be stored on the dist folder only,
# leaving the responsibility of publishing it to the user.
# If set to auto, the release will not be uploaded to the homebrew tap
# in case there is an indicator for prerelease in the tag e.g. v1.0.0-rc1
# Default is false.
skip_upload: false

# Custom block for brew.
# Can be used to specify alternate downloads for devel or head releases.
# Default is empty.
# custom_block: |
# head "https://github.com/some/package.git"

# Packages your package depends on.
# dependencies:
# - git
# - zsh

# Packages that conflict with your package.
# conflicts:
# - svn
# - bash

# Specify for packages that run as a service.
# Default is empty.
# plist: |
# <?xml version="1.0" encoding="UTF-8"?>

# So you can `brew test` your formula.
# Default is empty.
test: |
system "#{bin}/jscheck --version"

# Custom install script for brew.
# Default is 'bin.install "program"'.
install: |
bin.install "jscheck"

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- ![gopher](https://s3.us-east-2.amazonaws.com/kepler-images/warrensbox/tfswitch/logo.png =100x20) -->

The `jscheck` command line tool looks for json files and check's it's validity.
The `jscheck` command line tool looks for json files and check's its validity.
Sometimes not all our json files end with a `.json` extension. `jscheck` tries to figure out if your file has is a json format before linting.
The installation is minimal and easy.

Expand Down Expand Up @@ -68,4 +68,4 @@ The most recently selected versions are presented at the top of the dropdown.

## Issues

Please open *issues* here: [New Issue](https://github.com/warrensbox/jscheck/issues)
Please open *issues* here: [New Issue](https://github.com/warrensbox/jscheck/issues)