Skip to content

Commit

Permalink
Keep libcnb-cargo and libcnb-package versions in sync (#135)
Browse files Browse the repository at this point in the history
* Keep `libcnb.rs` tools in sync

Because the languages CLI tooling depends on `libcnb-package` to determine build information, this should be kept in sync with the version of `libcnb-cargo` installed in the `_buildpacks-release.yml` workflow so that we can be sure that behavior of the `libcnb.rs` tooling is consistent.
  • Loading branch information
colincasey authored Sep 12, 2023
1 parent f27dde0 commit 8516f42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/_buildpacks-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,16 @@ jobs:
- name: Rust cache
uses: Swatinem/[email protected]

# the version of `libcnb-cargo` installed here is kept in sync with the version of `libcnb-package`
# that the release automation CLI tooling depends on
- name: Install libcnb-cargo
# TODO: Derive this version from the `libcnb-package` version in this repo's `Cargo.toml`,
# or at least add a CI check to ensure the two versions are in sync.
run: cargo install --locked [email protected]
run: |
LOCKFILE_URL="https://raw.githubusercontent.com/heroku/languages-github-actions/${{ inputs.languages_cli_branch }}/Cargo.lock"
LIBCNB_PACKAGE_VERSION=$( \
curl --silent --show-error --fail --retry 5 --retry-all-errors --connect-timeout 10 --max-time 60 "${LOCKFILE_URL}" \
| yq -ptoml -oyaml '.package[] | select(.name == "libcnb-package") | .version' \
)
cargo install --locked "libcnb-cargo@${LIBCNB_PACKAGE_VERSION}"
- name: Install Languages CLI
uses: heroku/languages-github-actions/.github/actions/install-languages-cli@main
Expand Down
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ clap = { version = "4", default-features = false, features = [
] }
indexmap = "2"
lazy_static = "1"
# NB: Make sure to keep the `libcnb-cargo` version in `_buildpacks-release.yml` in sync with these.
libcnb-data = "=0.13.0"
libcnb-package = "=0.13.0"
markdown = "1.0.0-alpha.12"
Expand Down

0 comments on commit 8516f42

Please sign in to comment.