Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 1.46 KB

DEV.md

File metadata and controls

33 lines (21 loc) · 1.46 KB

Dev README

Development

After cloning this repository, set up the pre-commit hook to ensure proper formatting of the Go code and the go.mod and go.sum files:

ln -s ../../git-hooks/pre-commit .git/hooks/pre-commit

When developing, you can build a local version of the gocsv binary via running make. This will create a newly compiled gocsv binary in bin/.

Releasing

To release an update to gocsv, make sure you have committed and pushed the most recent commit on master. Then:

  1. Tag the latest commit following semantic versioning and push the tag.

    git tag -a v1.2.3 -m "Release v1.2.3"
    git push origin v1.2.3
  2. Create cross-compiled binaries for distribution. Cross-compilation uses xgo to handle issues with CGO packages in other platforms and architectures. Because xgo requires docker, you will need docker installed.

    go get -u github.com/karalabe/xgo
    make dist

    This will create zip files in the dist directory holding the gocsv binaries for various platforms and architectures. The version to be returned by gocsv version is derived from the Git tag, so make sure to only run this after having carried out step 1.

  3. Navigate to the Releases page and draft a new release. Upload the newly created distribution binaries (zip files in dist/) by dropping them on the page.