Skip to content

Commit

Permalink
Rename ref attribute to branch
Browse files Browse the repository at this point in the history
Recent [changes in niv](nmattia/niv#268) dropped
the usage of `ref` as a branch in git sources. The new attribute name is
`branch`.
  • Loading branch information
nmattia authored and knl committed Aug 28, 2020
1 parent 59a218e commit 1a47733
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions niv-updater
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ createPullRequestsOnUpdate() {
# rewrite the entry so that we can use token instead of SSH
if [[ -n $github_ssh ]]; then
echo 'As this is a dependency fetched with SSH, trying to switch to https type'
niv_branch="$(jq -r ".\"$dep\".ref // empty" <"$wdir/$SOURCES_JSON")"
niv_branch="$(jq -r ".\"$dep\".branch // empty" <"$wdir/$SOURCES_JSON")"
niv drop "$dep"
niv add "$dep_owner/$dep_repo" -a rev="$revision" -a branch="$niv_branch"
rm "$SOURCES_JSON.orig"
Expand Down Expand Up @@ -310,7 +310,7 @@ createPullRequestsOnUpdate() {
echo "Dependency '$dep' is hosted on github.com"

{
niv_branch="$(jq -r ".\"$dep\".ref // empty" <"$wdir/$SOURCES_JSON")"
niv_branch="$(jq -r ".\"$dep\".branch // empty" <"$wdir/$SOURCES_JSON")"
printf '## Changelog for %s:\n' "$dep"
printf 'Branch: %s\n' "$niv_branch"
printf 'Commits: [%s/%s@%.8s...%.8s](https://github.com/%s/%s/compare/%s...%s)\n\n' "$dep_owner" "$dep_repo" "$revision" "$new_revision" "$dep_owner" "$dep_repo" "$revision" "$new_revision"
Expand Down

0 comments on commit 1a47733

Please sign in to comment.