Skip to content

Commit

Permalink
fix: syntax in pipeline condition
Browse files Browse the repository at this point in the history
  • Loading branch information
karlbaumhauer committed Jun 30, 2023
1 parent 74b2671 commit fe9eff8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .azuredevops/pipelines/deploy-to-cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ steps:
- template: templates/push-to-storage-main.template.yml
## If deployment variable is set to 'none' do nothing
- script: |
if [[ $deployment == "code" ]]; then
if [[ $(deployment) == "code" ]]; then
echo "Everything has been deployed."
elif [[ $deployment == "docs" ]]; then
elif [[ $(deployment) == "docs" ]]; then
echo "Only storybook has been deployed."
else
echo "Nothing has been deployed."
Expand Down
2 changes: 1 addition & 1 deletion .azuredevops/pipelines/templates/purge-cdn.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ steps:
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
if [[ $deployment != "none" ]]; then
if [[ $(deployment) != "none" ]]; then
# Purge version folder
set -x
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
steps:
- bash: |
path=""
if [[ $deployment != "none" ]]; then
if [[ $(deployment) != "none" ]]; then
version=$(node -p "require('./package.json').version")
echo "Version is $version"
versionArray=($(echo "$version" | tr '.' ' '))
Expand All @@ -17,7 +17,7 @@ steps:
echo "Minor-wildcard path is: $minorWildcardPath"
# If docs-only changes, set paths to storybook
if [[ $deployment == "docs" ]]; then
if [[ $(deployment) == "docs" ]]; then
path="/storybook"
version+=$path
patchWildcardPath+=${path}
Expand Down Expand Up @@ -50,7 +50,7 @@ steps:
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
if [[ $deployment != "none" ]]; then
if [[ $(deployment) != "none" ]]; then
# Deploy to version folder
set -x
echo "Target folder is $version"
Expand Down

0 comments on commit fe9eff8

Please sign in to comment.