-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename CIRCLECI variables, with backwards compatibity #20
base: master
Are you sure you want to change the base?
Conversation
In case the script is used outside of CircleCI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
: "${SHA1:=$CIRCLE_SHA1}" | ||
: "${PROJECT_USERNAME:=$CIRCLE_PROJECT_USERNAME}" | ||
: "${PROJECT_REPONAME:=$CIRCLE_PROJECT_REPONAME}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls enlightne me. What does the preeceeding colon do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Source ( grep for The following table
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"these are not the colons you are (i am) looking for"
I meant the initial colon at the start of the line. I find this https://stackoverflow.com/a/4892546
A useful application for
:
is if you're only interested in using parameter expansions for their side-effects rather than actually passing their result to a command.In that case, you use the parameter expansion as an argument to either
:
orfalse
depending upon whether you want an exit status of 0 or 1. An example might be
: "${var:=$1}"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah sorry I misunderstood - yes, this is correct. If you don't add the :
it will try to "run" the result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Man, I copypasted from SO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case the script is used outside of CircleCI.