Skip to content

Commit

Permalink
Update build and add logo
Browse files Browse the repository at this point in the history
  • Loading branch information
bspaans committed Aug 19, 2017
1 parent 53b30a4 commit 5e3a887
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ lock.json
manifest.json
deps/
docs/cmd/
godog/*.txt
godog/*.tpl
model/runners/build/testdata/*.json
model/runners/deploy/testdata/*.json
4 changes: 1 addition & 3 deletions circle.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
machine:
services:
- docker
environment:
ESCAPE_PROJECT: "_"

dependencies:
override:
- curl https://storage.googleapis.com/escape-releases-eu/escape-v0.14.5.tgz > /home/ubuntu/bin/escape.tgz
- curl https://storage.googleapis.com/escape-releases-eu/escape-v0.15.2.tgz > /home/ubuntu/bin/escape.tgz
- tar -C /home/ubuntu/bin -xvzf /home/ubuntu/bin/escape.tgz

compile:
Expand Down
6 changes: 3 additions & 3 deletions escape.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ version: 0.16.@
description: |
The Escape Client. This release includes the source and one binary for Linux/AMD64. For full documentation see http://escape.ankyra.io/
logo: ""
logo: logo.png

# Dependencies. Reference dependencies by their full release ID or use
# the '@' symbol to resolve versions at build time.
Expand Down Expand Up @@ -153,7 +153,7 @@ errands:
description: "The target bucket"
- id: credentials
description: "Service account credentials"
- id: version
- id: escape_version
default: $this.version
script: scripts/upload_to_gcs.sh
publish_binaries:
Expand All @@ -163,7 +163,7 @@ errands:
description: "The target bucket"
- id: credentials
description: "Service account credentials"
- id: version
- id: escape_version
default: $this.version
script: scripts/publish-binaries.sh

Expand Down
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions scripts/publish-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ ARCHS="386 amd64"
echo "$INPUT_credentials" > service_account.json
gcloud auth activate-service-account --key-file service_account.json

echo "<h2>Escape v$INPUT_version</h2><ul>" > index.html
echo "<h2>Escape v$INPUT_version</h2><ul>" > main_index.html
echo "<h2>Escape v$INPUT_escape_version</h2><ul>" > index.html
echo "<h2>Escape v$INPUT_escape_version</h2><ul>" > main_index.html

for GOOS in $PLATFORMS; do
for ARCH in $ARCHS; do
target="escape-v$INPUT_version-$GOOS-$ARCH.tgz"
target="escape-v$INPUT_escape_version-$GOOS-$ARCH.tgz"
if [ ! -f $target ] ; then
docker run --rm -v "$PWD":/go/src/github.com/ankyra/escape-client \
-w /go/src/github.com/ankyra/escape-client \
Expand All @@ -27,18 +27,18 @@ for GOOS in $PLATFORMS; do
else
echo "File $target already exists"
fi
gcs_target="gs://$INPUT_bucket/escape-client/$INPUT_version/$target"
gcs_target="gs://$INPUT_bucket/escape-client/$INPUT_escape_version/$target"
gsutil cp "$target" "$gcs_target"
gsutil acl ch -u AllUsers:R "$gcs_target"
public_url="https://storage.googleapis.com/$INPUT_bucket/escape-client/$INPUT_version/$target"
public_url="https://storage.googleapis.com/$INPUT_bucket/escape-client/$INPUT_escape_version/$target"
echo "<li><a href=\"$public_url\">$target</a></li>" >> index.html
echo "<li><a href=\"$public_url\">$target</a></li>" >> main_index.html
done
done

echo "</ul>" >> index.html

gcs_index="gs://$INPUT_bucket/escape-client/$INPUT_version/index.html"
gcs_index="gs://$INPUT_bucket/escape-client/$INPUT_escape_version/index.html"
gsutil cp "index.html" "$gcs_index"
gsutil acl ch -u AllUsers:R "$gcs_index"
echo "Published $gcs_index"
Expand Down
4 changes: 2 additions & 2 deletions scripts/upload_to_gcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -euf -o pipefail

tarball="escape-v$INPUT_version.tgz"
tarball="escape-v$INPUT_escape_version.tgz"
target="gs://$INPUT_bucket/$tarball"

echo "Packing $tarball"
Expand All @@ -11,7 +11,7 @@ tar -cvzf "$tarball" escape
echo "$INPUT_credentials" > service_account.json
gcloud auth activate-service-account --key-file service_account.json

echo "Uploading $INPUT_version to ${target}"
echo "Uploading $INPUT_escape_version to ${target}"
gsutil cp "$tarball" "$target"

echo "Making archive world readable"
Expand Down

0 comments on commit 5e3a887

Please sign in to comment.