Skip to content

Commit

Permalink
Package only the binary for GitHub releases
Browse files Browse the repository at this point in the history
- update bindata with gorelease hooks
- add download instructions for Linux and MacOS
- rename the CI steps
  • Loading branch information
stefanprodan authored and errordeveloper committed Jun 5, 2018
1 parent 97ea66e commit 4ca12b7
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,38 @@
version: 2
jobs:
build:
test:
docker:
# https://circleci.com/docs/2.0/building-docker-images/#docker-version
- image: docker:17.11.0-ce
steps:
- checkout
- setup_remote_docker: {docker_layer_caching: true}
# just a simple build for now, but will use skaffold if it gets more complex
# TODO(p3): run unit tests
- run: docker build .
deploy:
build:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/weaveworks/eksctl
steps:
- checkout
- setup_remote_docker: {docker_layer_caching: true}
- run: make install-bindata
- run: make update-bindata
- run:
name: Build and publish
# TODO(p3): build an image that has the script and all dependencies installed
command: |
if [[ -z "${CIRCLE_PULL_REQUEST}" ]] && [[ "${CIRCLE_TAG}" ]] && [[ "${CIRCLE_PROJECT_USERNAME}" = "weaveworks" ]] ; then
curl -sL https://git.io/goreleaser | bash
else
echo "No deploy on PR"
echo "Not a tag release, skip publish"
fi
workflows:
version: 2
build-and-deploy:
test-and-build:
jobs:
- build
- deploy:
- test
- build:
filters:
tags:
only: /^[0-9].*/
9 changes: 8 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
before:
hooks:
- make install-bindata
- make update-bindata
builds:
- main: ./cmd/eksctl
binary: eksctl
Expand All @@ -7,4 +11,7 @@ builds:
- linux
goarch:
- amd64

archive:
format: tar.gz
files:
- none*
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ cluster. You can manage multiple clusters this way.

## Usage

To download the latest release, run:

```console
EKSCTL_VERSION=$(curl -s https://api.github.com/repos/weaveworks/eksctl/releases/latest | jq -r '.tag_name')
curl -sL https://github.com/weaveworks/eksctl/releases/download/${EKSCTL_VERSION}/eksctl_${EKSCTL_VERSION}_`uname -s`_amd64.tar.gz | tar xzvf - -C /usr/local/bin
```

To create a basic cluster, run:

```console
Expand Down

0 comments on commit 4ca12b7

Please sign in to comment.