Closed brikis98 closed 3 years ago
I can see you've come across the errors. Using an older version, everything is okay:
❯ ~/Downloads/fetch_darwin_amd64_0_3_11 --repo="https://github.com/gruntwork-io/terraform-google-ci" --branch="gcp-helpers" --source-path="/modules/gcp-helpers" "/tmp/download-dir/gcp-helpers"
Downloading latest commit from branch "gcp-helpers" of https://github.com/gruntwork-io/terraform-google-ci ...
Extracting files from <repo>/modules/gcp-helpers to /tmp/download-dir/gcp-helpers ... 3 files extracted
Download and file extraction complete.
However when I try with v0.3.13
:
❯ ~/Downloads/fetch_darwin_amd64_0_3_13 --repo="https://github.com/gruntwork-io/terraform-google-ci" --branch="gcp-helpers" --source-path="/modules/gcp-helpers" "/tmp/download-dir/gcp-helpers"
Downloading git reference "v0.1.0" of https://github.com/gruntwork-io/terraform-google-ci ...
Extracting files from <repo>/modules/gcp-helpers to /tmp/download-dir/gcp-helpers ... 0 files extracted
Download and file extraction complete.
It attempts to pull files from the latest tag. I haven't tracked down the offending code yet. cc @brikis98, @pete0emerson
It looks like adding
--ref
in https://github.com/gruntwork-io/fetch/pull/79 may have broken the--branch
parameter.With
fetch
versionv0.3.9
:Works as follows:
But with
fetch
versionv0.3.13
:I'm guessing the way
GitRef
is set here tolatestTag
is causing the code to go down the wrong code path.