Skip to content

Commit

Permalink
Fix parameter bug for ACE v1.6 (#18)
Browse files Browse the repository at this point in the history
* Add breaking version check for ACE v1.6
* Update to ACE v1.6
  • Loading branch information
reijoh authored Oct 8, 2024
1 parent a8324c1 commit a3947fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .azuredevops/ms.azure.deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ variables:
- name: SUBSCRIPTION_ID
value: d0d0d0d0-ed29-4694-ac26-2e358c364506
- name: VERSION_ACE
value: 1.4
value: 1.6
- name: WAIT_COUNT
value: 30
- name: WAIT_SECONDS
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/plan/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ inputs:
version_ace_tool:
description: "Azure Cost Estimator version."
required: false
default: "1.4"
default: "1.6"
outputs:
providers:
description: The Azure resource providers that should be registered.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ with:

See versions at <https://github.com/TheCloudTheory/arm-estimator/releases>.

Default: **"1.4"**
Default: **"1.6"**

### Usage

Expand Down Expand Up @@ -288,7 +288,7 @@ env:
scope: sub
template: main.bicep
template_parameters: main.bicepparam # parameters can be passed inline too, like this: namePrefix=t serviceShort=tstsp3
version_ace_tool: "1.4"
version_ace_tool: "1.6"
jobs:
plan:
Expand Down
12 changes: 9 additions & 3 deletions scripts/azure-cost.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,15 @@ if [[ "${IN_TEMPLATE_PARAMS}" == *'='* ]]; then
done
fi
cmd+=" --currency ${IN_CURRENCY}"
cmd+=' --disable-cache --generateJsonOutput'
cmd+=" --jsonOutputFilename ${LOG_NAME}"
# test out --generate-markdown-output --markdown-output-filename in v5
cmd+=' --disable-cache'
breakingVer='1.6'
if [ "$(printf '%s\n' "${breakingVer}" "${VERSION_ACE}" | sort -V | head -n1)" = "${breakingVer}" ]; then
cmd+=' --generate-json-output'
cmd+=" --json-output-filename ${LOG_NAME}"
else
cmd+=' --generateJsonOutput'
cmd+=" --jsonOutputFilename ${LOG_NAME}"
fi
echo "Run: ${cmd}"
eval "${cmd}" 1> >(tee -a "${log}") 2> >(tee -a "${log}" >&2)
log_output "${log}" '' ''

0 comments on commit a3947fb

Please sign in to comment.