ff5f2d22ed
This is due to bug 1767328, which is due to setuptools_scm using the 'git' command to find the version number when charms.openstack is installed (via the wheelhouse.txt) from git+https://... This only happens on trusty as xenial+ already have git installed. The script only tries to install git once and then uses a local flag file to stop it trying thereafter on every hook. Change-Id: I8a7daa0fff3d5bc7b11f70cde246975987c7cb66 Closes-Bug: #1767328
11 lines
444 B
Bash
Executable File
11 lines
444 B
Bash
Executable File
#!/bin/bash
|
|
# Ensure that git is installed for trusty due to bug: 1767328
|
|
# This can be removed when trusty support is dropped.
|
|
# Note we can't test the env JUJU_HOOK_NAME var as it isn't set for this script
|
|
# so this ensures that we only actually do it once.
|
|
if [[ ! -f "./.is-git-installed" ]]; then
|
|
juju-log -l 'DEBUG' "Running the apt-get install command as .is-git-installed not set"
|
|
apt-get install -y git
|
|
touch ./.is-git-installed
|
|
fi
|