Skip to content

Commit

Permalink
Merge branch 'release/0.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdean committed Dec 12, 2016
2 parents b66a033 + 7ccb862 commit 6a9aaa2
Show file tree
Hide file tree
Showing 919 changed files with 19,933 additions and 20,103 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ _testmain.go

# This project's binaries
sql-runner
*.tmp
coverage.out
coverage.html

# Vagrant
.vagrant/
45 changes: 45 additions & 0 deletions .release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
output_paths:
linux : dist/linux/sql-runner
darwin : dist/darwin/sql-runner
windows : dist/windows/sql-runner

local:
root_dir : <%= ENV['TRAVIS_BUILD_DIR'] %>

targets:
- type : "bintray"
user : <%= ENV['BINTRAY_SNOWPLOW_GENERIC_USER'] %>
password : <%= ENV['BINTRAY_SNOWPLOW_GENERIC_API_KEY'] %>

packages:
- repo : "snowplow-generic"
name : "sql-runner"
user_org : "snowplow"
publish : true
override : false
continue_on_conflict: false
version : <%= CMD['cat VERSION'] %>
build_version : <%= ENV['TRAVIS_TAG'] %>

build_commands:
- gox -osarch=linux/amd64 -output={{ output_paths.linux }} ./sql_runner/
- gox -osarch=darwin/amd64 -output={{ output_paths.darwin }} ./sql_runner/
- gox -osarch=windows/amd64 -output={{ output_paths.windows }} ./sql_runner/

artifacts:
- prefix : "sql_runner_"
suffix : "_linux_amd64"
type : "zip"
binary_paths:
- "{{ output_paths.linux }}"
- prefix : "sql_runner_"
suffix : "_darwin_amd64"
type : "zip"
binary_paths:
- "{{ output_paths.darwin }}"
- prefix : "sql_runner_"
suffix : "_windows_amd64"
type : "zip"
binary_paths:
- "{{ output_paths.windows }}.exe"
55 changes: 33 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
language: go
go:
- 1.4
- 1.5
- 1.6
- 1.7
- tip
install:
- export PATH=$PATH:$HOME/gopath/bin
- go get -v -u github.com/kr/godep
- godep get
- godep go build -v ./...

before_install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover

before_script:
- wget 'https://releases.hashicorp.com/consul/0.5.2/consul_0.5.2_linux_amd64.zip'
- unzip "consul_0.5.2_linux_amd64.zip"
- ./consul --version
- psql -c 'create database sql_runner_tests_1' -U postgres
- psql -c 'create database sql_runner_tests_2' -U postgres
- ./integration/setup_travis.sh

script:
- ./consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul &
- sleep 5
- ./integration-tests/consul_travis.bash
- godep go test -i ./...
- godep go test ./...
- test -z "$(go fmt ./...)"
- godep go build -v
- sql-runner -playbook integration-tests/good-postgres.yml -var test_date=`date "+%Y_%m_%d"` -fromStep "Create schema and table" -consul localhost:8500
- sql-runner -playbook ./integration-tests/good-postgres.yml -var test_date=`date "+%Y_%m_%d"` -fromStep "Create schema and table"
- test "7" = "$(sql-runner -playbook ./integration-tests/bad-mixed.yml &>/dev/null; echo $?)"
- test "6" = "$(sql-runner -playbook ./integration-tests/good-postgres.yml -var test_date=`date "+%Y_%m_%d"` &>/dev/null; echo $?)"
- go build -o sql-runner ./sql_runner/
- ./integration/run_tests.sh
- go test ./sql_runner/ -v -covermode=count -coverprofile=coverage.out
- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci

before_deploy:
- go get github.com/mitchellh/gox
- pip install --user release-manager==0.1.0

deploy:
skip_cleanup: true
provider: script
script: release-manager --config .release.yml --check-version --make-version --make-artifact --upload-artifact
on:
condition: '"${TRAVIS_GO_VERSION}" == "1.6"'
tags: true

addons:
postgresql: "9.3"
postgresql: '9.3'

env:
global:
- secure: eP2CEhjE6YEgajudRcW6Lsyy92IxAB1KS5Cw0p/defwpouSuZS4NF8+YjcUhfI9sbkobL6KGaL12CYqLWToepQpiDHJ1eRaH+/8HQ+kgqwLxmHptVlqEXhkQPVJL04MvxZqeXocuOluGlWHOHMdlmDTA7eI/tKJtyykIRKyXFAc=
- secure: TP/mMjN910q8M/tknHkPxdYfKl25eQqdSscfTlQlnBxJpQgrgX25WgK1XuNI+IUTTmn1cM/eVRyKvUWflxqzwSUhgWO7s1EcN18WYU7Xl+RkWaoOMjqzV3q5l4M8rDK8LiBM/xrcz/rQMTZnWYm/tJ6+tjTQiuAezZh3bwuMvAo=
20 changes: 20 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
Version 0.5.0 (2016-12-12)
--------------------------
Add ability to set a lockfile for a run (#54)
Add command to check lockfile (#67)
Add command to delete lockfile (#66)
Add integration test suite (#71)
Add tcpKeepAlive=true for long-running queries via NAT (#57)
Add test suite (#63)
Refactor: Playbook and SQL loading interface (#62)
Refactor code structure (#72)
Add ability to run a single query, -runQuery (#55)
Change default for template from false to true (#53)
Update copyright year to 2015-2016 (#69)
Update README to direct users to wiki (#65)
Update Postgres library to pg.v5 (#73)
Fix SQL Runner download link pointing to old version (#58)
Stop testing travis on tip (#68)
Add Bintray credentials to .travis.yml (#70)
Add CI/CD (#64)

Version 0.4.0 (2015-12-03)
--------------------------
Bump gopkg.in/pg.v2 to v3 (#48)
Expand Down
123 changes: 101 additions & 22 deletions Godeps/Godeps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 6a9aaa2

Please sign in to comment.