Skip to content

Instantly share code, notes, and snippets.

@YanhaoYang
Created May 25, 2019 08:27
Show Gist options
  • Save YanhaoYang/d9f86c69bbe3f44781ed31c99f87e174 to your computer and use it in GitHub Desktop.
Save YanhaoYang/d9f86c69bbe3f44781ed31c99f87e174 to your computer and use it in GitHub Desktop.
Archive current repository and run Codeship's jet
#!/bin/bash
set -x
set -e
root_dir=$(pwd)
tmpdir=$(mktemp -d "${TMPDIR:-/tmp/}$(basename $0).XXXXXXXXXXXX")
git archive --prefix=my-jet/ HEAD > "$tmpdir/archive.tgz"
cd "$tmpdir"
tar xf archive.tgz
cd my-jet
cp "$root_dir/codeship.aes" .
jet steps
jet cleanup
cd "$root_dir"
rm -fr "$tmpdir"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment