Last active
June 5, 2021 14:47
-
-
Save helins/59e3abfc96f7a641d608a314fb6b8665 to your computer and use it in GitHub Desktop.
Command for installing and caching Babashka on CircleCI
This file contains hidden or 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
commands: | |
install_bb: | |
description: "Install Babashka" | |
parameters: | |
version: | |
default: "0.4.4" | |
type: string | |
steps: | |
- restore_cache: | |
keys: | |
- babashka-<< parameters.version >> | |
- run: | |
name: Download Babashka | |
command: if ! [ -f "bb" ]; then \curl -L https://github.com/babashka/babashka/releases/download/v<< parameters.version >>/babashka-<< parameters.version >>-linux-amd64.tar.gz -o bb.tar.gz ; fi | |
- run: | |
name: Uncompress Babashka | |
command: if [ -f "bb.tar.gz" ]; then \tar -xzvf bb.tar.gz ; fi | |
- run: | |
name: Ensure Babashka is executable | |
command: chmod +x bb | |
- save_cache: | |
key: babashka-<< parameters.version >> | |
paths: | |
- bb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment