Skip to content

Commit

Permalink
changes for first release
Browse files Browse the repository at this point in the history
  • Loading branch information
paulvollmer committed Sep 17, 2018
1 parent 64ad6f1 commit 0e53aea
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@

*.csv
/htmltable2csv
/dist
9 changes: 9 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project_name: htmltable2csv
builds:
- binary: htmltable2csv
goos:
- darwin
- linux
goarch:
- amd64
- 386
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
VERSION=0.1.0

all: lint test

build:
@go build

lint:
@go fmt ./...
@golint ./...

test: build
@./htmltable2csv -v
@./htmltable2csv -url "https://www.w3schools.com/html/html_tables.asp" -selector "#customers > tbody > tr" -csv data.csv

release:
git tag -a v${VERSION} -m "Version ${VERSION}"
git push origin v${VERSION}
goreleaser

.PHONY: all lint build test release
8 changes: 6 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ import (
"github.com/paulvollmer/htmltable2csv/scraper"
)

const version = "0.1.0"
var (
version = "dev"
commit = "none"
date = "unknown"
)

func usage() {
fmt.Println("Usage: htmltable2csv [flags]")
Expand All @@ -28,7 +32,7 @@ func main() {
flag.Parse()

if *flagVersion {
fmt.Printf("v%s\n", version)
fmt.Printf("%v, commit %v, built at %v", version, commit, date)
os.Exit(0)
}

Expand Down

0 comments on commit 0e53aea

Please sign in to comment.