I have a travis segment where it checks the env variable cassadra_version.
if [ ! -z ${CASSANDRA_VERSION} ]; then ./setup-cassandra.sh; fi;
I would also like to run only if there are no tags called deploy.
I tried: if [ ! -z ${CASSANDRA_VERSION} ] && [ "${TRAVIS_TAG}" =~ '^((?!deploy).)*$' ]; then ./setup-cassandra.sh; fi; if [ ! -z ${CASSANDRA_VERSION} ] && [ "${TRAVIS_TAG}" =~ '^((?!deploy).)*$' ]; then ./setup-cassandra.sh; fi;
but it gives me a binary operator error
if [ [! -z ${CASSANDRA_VERSION} ] && [ "${TRAVIS_TAG}" =~ '^((?!deploy).)*$' ]]; then ./setup-cassandra.sh; fi;
also gives me an error
if [ [! -z ${CASSANDRA_VERSION} ] && [ ${TRAVIS_TAG} =~ '^((?!deploy).)*$' ]]; then ./setup-cassandra.sh; fi;
also.
then I also tried: if [$ {TRAVIS_TAG} = ~ '^ ((! deploy).) * $']; then. / setup -cassandra.sh; Fi `
it also gives me a binary operator.
Am I not performing regular expression correctly?
source share