From 5bb06fdb50f7a04a54aeb354b285c6f76cd80ea3 Mon Sep 17 00:00:00 2001 From: Ryan Petrello Date: Fri, 13 Oct 2017 12:17:04 -0400 Subject: [PATCH] stop hard-coding the awx version in the isolated development environment see: #296 --- Makefile | 1 + awx/main/expect/run.py | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 5971396b9d..4269eed2ca 100644 --- a/Makefile +++ b/Makefile @@ -545,6 +545,7 @@ docker-isolated: TAG=$(COMPOSE_TAG) DEV_DOCKER_TAG_BASE=$(DEV_DOCKER_TAG_BASE) docker-compose -f tools/docker-compose.yml -f tools/docker-isolated-override.yml create docker start tools_awx_1 docker start tools_isolated_1 + echo "__version__ = '`python setup.py --version`'" | docker exec -i tools_isolated_1 /bin/bash -c "cat > /venv/awx/lib/python2.7/site-packages/awx.py" if [ "`docker exec -i -t tools_isolated_1 cat /root/.ssh/authorized_keys`" == "`docker exec -t tools_awx_1 cat /root/.ssh/id_rsa.pub`" ]; then \ echo "SSH keys already copied to isolated instance"; \ else \ diff --git a/awx/main/expect/run.py b/awx/main/expect/run.py index 3c248f9610..3654e31ba2 100755 --- a/awx/main/expect/run.py +++ b/awx/main/expect/run.py @@ -271,12 +271,8 @@ def __run__(private_data_dir): if __name__ == '__main__': - __version__ = '3.2.0' - try: - import awx - __version__ = awx.__version__ - except ImportError: - pass # in devel, `awx` isn't an installed package + import awx + __version__ = awx.__version__ parser = argparse.ArgumentParser(description='manage a daemonized, isolated ansible playbook') parser.add_argument('--version', action='version', version=__version__ + '-isolated') parser.add_argument('command', choices=['start', 'stop', 'is-alive'])