habitat icon indicating copy to clipboard operation
habitat copied to clipboard

cannot mutate download URL with `update_pkg_version` function

Open bixu opened this issue 6 years ago • 2 comments

The key bits of my build plan look like this:

pkg_version() {
  git tag --sort="version:refname" | tail --lines=1 | cut --delimiter=v --fields=2
}

pkg_source="https://github.com/circonus-labs/${pkg_name}/releases/download/v${pkg_version}/${pkg_name}_${pkg_version}_linux_64-bit.tar.gz"

pkg_build_deps=(core/git)
do_before() {
  update_pkg_version
  return $?
}

But I see this in my build logs:

circonus-agent: Version updated to '0.13.0'

circonus-agent: Downloading 'https://github.com/circonus-labs/circonus-agent/releases/download/v/circonus-agent__linux_64-bit.tar.gz' to 'circonus-agent__linux_64-bit.tar.gz'

@christophermaier thinks the build system may finish handling pkg_source before we run the update_pkg_version function.

bixu avatar May 11 '18 18:05 bixu

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] avatar Apr 03 '20 06:04 stale[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We value your input and contribution. Please leave a comment if this issue still affects you.

stale[bot] avatar Aug 12 '22 00:08 stale[bot]