I’m trying to use the new conditional ‘when’ clause. However when I use it, I receive the following error
step type "when" is not a valid type
I’ve updated my version to 2.1 and I’m trying to use it in conjunction with a cache
version: 2.1
jobs:
build:
parallelism: 3
docker:
...
steps: # a collection of executable commands
...
- run:
name: Calculate Assets Checksum
command: find app/assets -type f | sort | xargs md5sum > assets.md5
- restore_cache:
keys:
- rails-fitmo-assets-{{ checksum "assets.md5" }}
- rails-fitmo-assets-
- when:
condition: if [[ ! -d public/assets ]]
steps:
- run: echo "assets exists NOW"
- run: bundle exec rake assets:precompile
- save_cache:
key: rails-fitmo-assets-{{ checksum "assets.md5" }}
paths:
- public/assets
- tmp/cache/assets/sprockets
Is version 2.1 not available yet? the docs don't indicate either way so I am assuming 2.1 is available. Am I doing something wrong?