From 5a2cf6253bbf62c35f4e7a41f54b2d5f45bf100d Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Thu, 30 May 2024 12:35:05 +0200 Subject: [PATCH] build-project --- cd/__init__.py | 11 +++++++++++ cmd/cd-build-project.sh | 9 --------- 2 files changed, 11 insertions(+), 9 deletions(-) delete mode 100755 cmd/cd-build-project.sh diff --git a/cd/__init__.py b/cd/__init__.py index c161dd6..8f2bf6e 100644 --- a/cd/__init__.py +++ b/cd/__init__.py @@ -25,6 +25,16 @@ def cd_browse_workspace(): print(path) +def cd_build_project(): + for extension in ['py', 'sh']: + path = os.path.join(project.root, f'build.{extension}') + if os.path.exists(path): + ps.run(path) + break + else: + pass + + def cd_clone_branch(): print(f'''\ {project.url} @@ -48,6 +58,7 @@ def install_commands(path): user = '/usr/local/bin' for command in [ 'browse-workspace', + 'build-project', 'clone-branch', 'list-environment', ]: diff --git a/cmd/cd-build-project.sh b/cmd/cd-build-project.sh deleted file mode 100755 index 460566e..0000000 --- a/cmd/cd-build-project.sh +++ /dev/null @@ -1,9 +0,0 @@ -if [ -x './build.py' ] ; then - ./build.py \ - || exit -elif [ -x './build.sh' ] ; then - ./build.sh \ - || exit -else - exit -fi