diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 000000000..df8beb905 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,22 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +builds: +- env: + - CGO_ENABLED=0 +archive: + replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8d02c7584 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,22 @@ +language: go + +go: + - 1.8.3 + +services: + - docker + +script: + - true + +after_success: + - test -n "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash + - CGO_ENABLED="0" GOARCH="amd64" GOOS="linux" go build -a -installsuffix cgo -o ./app + - docker login -u $DOCKER_USER -p $DOCKER_PASSWORD + - export REPO=peakcom/s5cmd + - echo $REPO:$TRAVIS_BRANCH + - docker build -f Dockerfile -t $REPO:$TRAVIS_BRANCH . + - docker push $REPO:$TRAVIS_BRANCH + - export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_TAG ; fi` + - if [[ ! -z "${TAG}" ]]; then docker tag $REPO:$TRAVIS_BRANCH $REPO:$TAG; fi + - if [[ ! -z "${TAG}" ]]; then docker push $REPO:$TAG; fi \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..996bcf18f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine +ADD app /app +CMD ["./app"] \ No newline at end of file