diff options
| author | Julian Blake Kongslie | 2021-03-23 21:22:21 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2021-03-23 21:33:37 -0700 |
| commit | 60a8991b751ee6df04976d846450759763cf644f (patch) | |
| tree | 68b0a3a2212c74048de3f60b22e97fe4955a4318 | |
| parent | Changes for Windows-friendly builds. (diff) | |
| download | toycpu-60a8991b751ee6df04976d846450759763cf644f.tar.xz | |
Adding olamic hook to autobuild source archives.
| -rw-r--r-- | olamic-run | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/olamic-run b/olamic-run new file mode 100644 index 0000000..20a745f --- /dev/null +++ b/olamic-run | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | # vim: set ft=bash : | ||
| 2 | |||
| 3 | make | ||
| 4 | |||
| 5 | if [[ $GIT_REF =~ ^refs/heads/(.+)$ ]]; then | ||
| 6 | INSTALL_DIR=/srv/olamic/artifacts/toycpu/"${BASH_REMATCH[1]}" | ||
| 7 | fi | ||
| 8 | |||
| 9 | if [[ "${INSTALL_DIR:-}" != "" ]]; then | ||
| 10 | mkdir -p "${INSTALL_DIR}" | ||
| 11 | git archive -o "${INSTALL_DIR}/toycpu.zip" @ | ||
| 12 | fi | ||
