diff --git a/apps/cli/executables/pexable/null/null/null.py b/apps/cli/executables/pexable/null/null/null.py index 6c06a54898482fee2d8649971935f36b4032a468..6337eff7e55d6f7e486139374cd513ca295d5597 100644 --- a/apps/cli/executables/pexable/null/null/null.py +++ b/apps/cli/executables/pexable/null/null/null.py @@ -17,6 +17,7 @@ # along with Workspaces. If not, see <https://www.gnu.org/licenses/>. import argparse +import importlib.metadata import logging import os import random @@ -136,6 +137,7 @@ def make_arg_parser() -> argparse.ArgumentParser: description=_DESCRIPTION.format(version), formatter_class=argparse.RawTextHelpFormatter, ) + parser.add_argument("--version", action="version", version=importlib.metadata.version("ssa-null")) options = parser.add_argument_group("options", "settings for altering program behavior") options.add_argument( "-v", diff --git a/ci/push-package.template.yml b/ci/push-package.template.yml index ae6aed91648776ee18b750c0b3e1e7ba0cd4d180..bdf49d21a05508c48a6a2bea26f4f5eb9e6438ec 100644 --- a/ci/push-package.template.yml +++ b/ci/push-package.template.yml @@ -14,32 +14,37 @@ - ln -s "$(which python3)" /home/ssa/bin/python3.10 - export PATH=$PATH:/home/ssa/bin - pip install pex - - pex ${PIP_NAME} -c ${PACKAGE_NAME} -o ./${PACKAGE_NAME} -i https://gitlab.nrao.edu/api/v4/projects/621/packages/pypi/simple --python-shebang /home/ssa/bin/python3.10 --disable-cache + - pex ${PEX_SOURCE} -c ${PACKAGE_NAME} -o ./${PACKAGE_NAME} -i https://gitlab.nrao.edu/api/v4/projects/621/packages/pypi/simple --python-shebang /home/ssa/bin/python3.10 --disable-cache - echo "Releasing PEX to sbin area - ${PACKAGE_NAME}" - scp ${PACKAGE_NAME} root@shipman.aoc.nrao.edu:/lustre/aoc/cluster/pipeline/dsoc-${DEPLOY_ENV}/workspaces/sbin/ rules: - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH =~ /(^[0-9]\.[0-9]|^[0-9]\.[0-9]\.[0-9])-DEVELOPMENT/' variables: DEPLOY_ENV: "dev" + PEX_SOURCE: ${PIP_NAME} changes: - apps/cli/executables/pexable/${PACKAGE_NAME}/**/* - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' variables: DEPLOY_ENV: "dev" + PEX_SOURCE: ${PIP_NAME}==2.8.2rc1 changes: - apps/cli/executables/pexable/${PACKAGE_NAME}/**/* - if: '$CI_COMMIT_TAG =~ /^end-of-sprint-[0-9]+/' variables: DEPLOY_ENV: "test" + PEX_SOURCE: ${PIP_NAME} changes: - apps/cli/executables/pexable/${PACKAGE_NAME}/**/* - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]+/' variables: DEPLOY_ENV: "test" + PEX_SOURCE: ${PIP_NAME}==$CI_COMMIT_TAG changes: - apps/cli/executables/pexable/${PACKAGE_NAME}/**/* - if: '$CI_COMMIT_TAG =~ /[0-9]+\.[0-9]+\.[0-9]+$/' variables: DEPLOY_ENV: "prod" + PEX_SOURCE: ${PIP_NAME}==${CI_COMMIT_TAG} changes: - apps/cli/executables/pexable/${PACKAGE_NAME}/**/*