Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from astronomerio/feature/add-circle-ci
prep for circle ci
- Loading branch information
Showing
4 changed files
with
70 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
defaults: &defaults | ||
working_directory: /go/src/github.com/astronomerio/astro-cli | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/golang:1.10 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "astro-cli version:" | ||
command: | | ||
echo $CIRCLE_TAG | ||
deploy: | ||
<<: *defaults | ||
docker: | ||
- image: circleci/golang:1.10 | ||
steps: | ||
- checkout | ||
- run: | ||
name: "Write metadata" | ||
command: | | ||
if [ "${CIRCLE_TAG}" != "" ]; then | ||
./.circleci/scripts/write_metadata.sh $CIRCLE_TAG "`date '+%B %d, %Y @ %H:%M:%S'`" | ||
else | ||
echo "Not tagged, skipping step" | ||
fi | ||
- run: | ||
name: "Install Goreleaser" | ||
command: | | ||
if [ "${CIRCLE_TAG}" != "" ]; then | ||
curl -sL https://git.io/goreleaser | bash | ||
else | ||
echo "Not tagged, skipping step" | ||
fi | ||
workflows: | ||
version: 2 | ||
distribute: | ||
jobs: | ||
- build: | ||
filters: | ||
branches: | ||
only: master | ||
tags: | ||
only: /^v\d[\d\.]+/ | ||
- deploy: | ||
requires: | ||
- build | ||
filters: | ||
tags: | ||
only: /^v\d[\d\.]+/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
VERSION=$1 | ||
BUILD_DATE="`date '+%B %d, %Y @ %H:%M:%S'`" | ||
CONTENT="package meta\n\nvar VERSION = \"$VERSION\"\nvar BUILD_DATE = \"$BUILD_DATE\"" | ||
|
||
mkdir -p meta | ||
|
||
printf "$CONTENT" > ./meta/meta.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
.astro/ | ||
astro | ||
Dockerfile | ||
packages.txt | ||
requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters