From ddec3cefebb014d05a7ba6e51c33f868e22becd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz?= Date: Sat, 14 Sep 2019 16:16:36 +0200 Subject: [PATCH] libroar/RoarWindowAbout.py, assets/tools/deploy-python.sh: updated. --- assets/tools/deploy-python.sh | 28 ++++++++++++++++++---------- libroar/RoarWindowAbout.py | 2 +- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/assets/tools/deploy-python.sh b/assets/tools/deploy-python.sh index 0009d0c..be94c7e 100755 --- a/assets/tools/deploy-python.sh +++ b/assets/tools/deploy-python.sh @@ -11,12 +11,18 @@ msgf() { }; deploy() { - local _vflag="${1}" _release_fname="" _release_dname="" _release_version=""; + local _rflag="${1}" _vflag="${2}" _release_fname="" _release_dname="" _release_version="" _release_version_long=""; - _release_version="$(git rev-parse --short HEAD)"; + if [ "${_rflag}" != "" ]; then + _release_version="v${_rflag}"; + _release_version_long="Release v${_rflag}"; + git tag "${PACKAGE_NAME}-${_release_version}"; + else + _release_version="$(git rev-parse --short HEAD)"; + _release_version_long="Prerelease (Git revision $(git rev-parse --short HEAD))"; + fi; _release_dname="${RELEASES_DNAME}/${PACKAGE_NAME}-${_release_version}"; _release_fname="${_release_dname}.zip"; - find -L . \ -mindepth 1 \ -not -path "./${RELEASES_DNAME}/*" \ @@ -30,7 +36,7 @@ deploy() { -not -name '.gitignore' \ -not -name "${0##*/}" |\ cpio --quiet -dLmp "${_release_dname}"; - sed -i"" "s/__ROAR_RELEASE_GIT_SHORT_REV__/${_release_version}/" "${_release_dname}/libroar/RoarWindowAbout.py"; + sed -i"" "s/__ROAR_RELEASE_VERSION__/${_release_version_long}/" "${_release_dname}/libroar/RoarWindowAbout.py"; cd "${RELEASES_DNAME}"; if [ "${_vflag:-0}" -eq 0 ]; then zip -9 -r "${_release_fname##${RELEASES_DNAME}/}" "${_release_dname##${RELEASES_DNAME}/}" >/dev/null; @@ -41,16 +47,18 @@ deploy() { }; usage() { - echo "usage: ${0} [-h] [-v]" >&2; - echo " -h.........: show this screen" >&2; - echo " -v.........: be verbose" >&2; + echo "usage: ${0} [-h] [-r version] [-v]" >&2; + echo " -h..........: show this screen" >&2; + echo " -r version..: create release w/ version" >&2; + echo " -v..........: be verbose" >&2; }; main() { local _cmd="" _opt="" _vflag=0; - while getopts hv _opt; do + while getopts hr:v _opt; do case "${_opt}" in h) usage; exit 0; ;; + r) _rflag="${OPTARG}"; ;; v) _vflag=1; ;; *) usage; exit 1; ;; esac; done; @@ -63,9 +71,9 @@ main() { done; msgf "Building release..."; if [ "${_vflag:-0}" -eq 0 ]; then - deploy "${_vflag}" >/dev/null; + deploy "${_rflag}" "${_vflag}" >/dev/null; else - deploy "${_vflag}"; + deploy "${_rflag}" "${_vflag}"; fi; msgf "Built release."; }; diff --git a/libroar/RoarWindowAbout.py b/libroar/RoarWindowAbout.py index b7b5ff2..255a816 100644 --- a/libroar/RoarWindowAbout.py +++ b/libroar/RoarWindowAbout.py @@ -23,7 +23,7 @@ class RoarWindowAbout(wx.Dialog): logoPathName = logoPathNames[random.randint(0, len(logoPathNames) - 1)] self.logo = wx.StaticBitmap(self.panel, -1, wx.Bitmap(logoPathName)) - self.title = wx.StaticText(self.panel, label="roar -- mIRC art editor for Windows && Linux\nGit revision __ROAR_RELEASE_GIT_SHORT_REV__\nhttps://www.github.com/lalbornoz/roar/\nCopyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz ", style=wx.ALIGN_CENTER) + self.title = wx.StaticText(self.panel, label="roar -- mIRC art editor for Windows && Linux\n__ROAR_RELEASE_VERSION__\nhttps://www.github.com/lalbornoz/roar/\nCopyright (c) 2018, 2019 Lucio Andrés Illanes Albornoz ", style=wx.ALIGN_CENTER) self.title.SetFont(wx.Font(8, wx.DEFAULT, wx.NORMAL, wx.NORMAL, underline=False)) labelsText = ["&roar!", "&ROAR!", "&roaaaaaaar!", "&ROAROARAOR", "_&ROAR_"] labelText = labelsText[random.randint(0, len(labelsText) - 1)]