Skip to content

Commit

Permalink
TOOL-17954 Add environment variable to fix cloud-init build (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
Prakash Surya authored Jan 23, 2023
1 parent 6712485 commit 9662eec
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/cloud-init/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ function checkstyle() {
}

function build() {
#
# We set this environment variable to coerce the "read-version"
# script (part of the cloud-init repository) to behave correctly
# (for us) when it's run as part of the cloud-init build system.
#
# Specifically, without this set, the cloud-init build system
# will attempt to dynamically set the package version based on
# the upstream git tags that it expects to exist. The problem
# for us, is these upstream git tags don't exist when we do the
# package build, and even if they did exist, our repository's
# git history is completely unrelated to the upstream git
# history, due to how we merge with Ubuntu (i.e. using Ubuntu's
# source package, rather than a git repository).
#
# Thus, without this settinng, the build will fail when it tries
# to dynamically set the package version.
#
export TRAVIS_PULL_REQUEST_BRANCH="upstream/"

logmust dpkg_buildpackage_default
}

Expand Down

0 comments on commit 9662eec

Please sign in to comment.