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