Index: build.sh =================================================================== diff -u -r6388ebc1ce5d1126394c2718e0d9c5ddf7990bef -re0eadb4bf0d4db2d0c3a053a992f5c9cf5c165c4 --- build.sh (.../build.sh) (revision 6388ebc1ce5d1126394c2718e0d9c5ddf7990bef) +++ build.sh (.../build.sh) (revision e0eadb4bf0d4db2d0c3a053a992f5c9cf5c165c4) @@ -14,9 +14,22 @@ # @date (original) 02-Apr-2020 # ############################################################################ +OLD_NAME="leahi_dialin-1.0.0-py3-none-any.whl" +NEW_NAME="leahi_dialin-1.0.0" +NEW_NAME+="-$1" # Append the Bamboo Build Number (Incremental version) +NEW_NAME+="+$2" # Append the Project Checkout Branch Name +NEW_NAME+=".$3" # Append the Build Commit Hash +NEW_NAME+="-py3-none-any.whl" # Append the metadata and the file extension name + rm -rf dist/ python3 setup.py bdist_wheel if [ $? -ne 0 ]; then echo "Error building package. Exiting..."; exit 1; fi -echo "Success! Please distribute dist/leahi_dialin-x.y.z-py3-none-any.whl accordingly." +cd dist/ || return +if [ -f "$OLD_NAME" ]; then + mv "$OLD_NAME" "$NEW_NAME" + echo "Success! Please distribute dist/$NEW_NAME accordingly." +else + echo "Wheel file not found but built. Please rename manually." +fi \ No newline at end of file Fisheye: Tag e0eadb4bf0d4db2d0c3a053a992f5c9cf5c165c4 refers to a dead (removed) revision in file `leahi_dialin/version.py'. Fisheye: No comparison available. Pass `N' to diff? Index: setup.py =================================================================== diff -u -r6388ebc1ce5d1126394c2718e0d9c5ddf7990bef -re0eadb4bf0d4db2d0c3a053a992f5c9cf5c165c4 --- setup.py (.../setup.py) (revision 6388ebc1ce5d1126394c2718e0d9c5ddf7990bef) +++ setup.py (.../setup.py) (revision e0eadb4bf0d4db2d0c3a053a992f5c9cf5c165c4) @@ -59,40 +59,34 @@ DEV_VERSION = VERSION -if check_if_git_repo(): - branch = get_branch() - commit = get_last_commit() - DEV_VERSION += "+{0}".format(branch) - DEV_VERSION += ".{0}".format(commit) - if __name__ == '__main__': - check_if_git_repo() - setuptools.setup( - name="leahi_dialin", - author="Micheal Garthwaite", - author_email="mgarthwaite@diality.com", - description="The Diality Dialin API", - packages=setuptools.find_packages(exclude=["test*", "tools", "venv"]), - classifiers=[ # all classifiers: https://pypi.org/classifiers/ - "Programming Language :: Python :: 3.6", - "Operating System :: POSIX :: Linux", - ], - python_requires="~=3.6", - version=DEV_VERSION, - install_requires=[ - "aenum", - "cycler", - "importlib-metadata", - "kiwisolver", - "matplotlib", - "numpy", - "openpyxl", - "pandas", - "pyparsing", - "python-can", - "python-dateutil", - "six", - "wrapt", - ] - ) + if check_if_git_repo(): + setuptools.setup( + name="leahi_dialin", + author="Jonny Paguio", + author_email="jpaguio@diality.com", + description="The Diality Dialin API", + packages=setuptools.find_packages(exclude=["test*", "tools", "venv"]), + classifiers=[ # all classifiers: https://pypi.org/classifiers/ + "Programming Language :: Python :: 3.6", + "Operating System :: POSIX :: Linux", + ], + python_requires="~=3.6", + version=DEV_VERSION, + install_requires=[ + "aenum", + "cycler", + "importlib-metadata", + "kiwisolver", + "matplotlib", + "numpy", + "openpyxl", + "pandas", + "pyparsing", + "python-can", + "python-dateutil", + "six", + "wrapt", + ] + )