charm-tools
charm-tools copied to clipboard
Charm build output dir is different depending on where you run it.
Checklist
- [X] Confirmed this is an issue with charm-tools, not charmstore-client
- [X] Provide versions of tools used
- [X] Described the feature or ways to replicate the issue
What version am I running?
I ran the following command: charm version and got the following ouput:
charm 2.2.0-0ubuntu1~ubuntu16.04.1~ppa2
charm-tools 2.2.0
I am using: Ubuntu 16.04
Issue/Feature
charm build has a different output directory depending on how you supply the layer to build.
Reproduce:
cd $LAYER_PATH
`charm build openvpn`
# destination dir is $JUJU_REPOSITORY/builds/openvpn
cd $LAYER_PATH/../
`charm build openvpn`
# destination dir is $JUJU_REPOSITORY/trusty/openvpn
cd $LAYER_PATH/../
`charm build $LAYER_PATH/openvpn`
# destination dir is $JUJU_REPOSITORY/builds/openvpn
I expect/expected the following
All these commands have the same output dir
What I got
The output dir is different
@petevg also has this issue.
We should revisit this and make the output directory consistent. We should also remove the default behavior when $JUJU_REPOSITORY is not set to build inside the current directory, since that will almost always lead to incorrect results.