From eaf34d273d6dcea45306fdf750e846e79ddadb21 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Tue, 30 Jun 2020 10:52:23 +0000 Subject: [PATCH] Set PBR_VERSION for updates and pinned builds The PBR_VERSION should be set for pinned builds as well as updates. --- charm-init.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/charm-init.sh b/charm-init.sh index e400cde..58e58bd 100755 --- a/charm-init.sh +++ b/charm-init.sh @@ -9,6 +9,11 @@ done git submodule update --init +# pbr seems unable to detect the current tag when installing +# from a local checkout using a git submodule. To work around this +# manually set the version. +export PBR_VERSION=$(cd mod/charm-helpers; git describe --tags) + if [[ -z "$UPDATE" ]]; then pip install -t lib -r build-requirements.txt else @@ -17,10 +22,6 @@ else git -C mod/ops-interface-ceph-client pull origin master git -C mod/ops-interface-tls-certificates pull origin master git -C mod/charm-helpers pull origin master - # pbr seems unable to detect the current tag when installing - # from a local checkout using a git submodule. To work around this - # manually set the version. - export PBR_VERSION=$(cd mod/charm-helpers; git describe --tags) pip install -t lib -r build-requirements.txt --upgrade fi