roar/assets/tools/deploy-python.sh
Lucio Andrés Illanes Albornoz 52c5f679af Cleanup, bugfixes & C++ backend implementation.
1) {About,Melp?} window: switch to green on black.
2) Assets window: scroll assets list on selected item update w/ <Cursor> or on deletion.
3) Canvas window: change default brush colours to [3, -1].
4) Canvas window: copy canvas cells given transparent cells from tools.
5) Canvas window: don't disable {re,un}do during object tool usage.
6) Canvas window: don't hide cursor during {re,un}do.
7) Canvas window: draw new cells using current brush background colour on resize.
8) Canvas window: fix memory leak on cell size updating.
9) Text tool: process [\r\n] in text pasted from clipboard.

assets/audio/roar{vap0r[1-8],viking[1-5]}.wav: added.
assets/text/README.txt: updated.
assets/tools/AnsiToMiRCART.py: added (for spoke.)
assets/tools/deploy-python.sh: updated.
2019-10-24 21:14:00 +02:00

87 lines
2.4 KiB
Bash
Executable File

#!/bin/sh
#
PACKAGE_NAME="roar-python";
RELEASE_DEPS="cpio find rm sed zip";
RELEASES_DNAME="releases";
msgf() {
local _fmt="${1}"; shift;
printf "%s >>> ${_fmt}\n" "$(date +"%d-%^b-%Y %H:%M:%S")" "${@}";
};
deploy() {
local _rflag="${1}" _vflag="${2}" _release_fname="" _release_dname="" _release_version="" _release_version_long="";
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}/*" \
-not -path "./${RELEASES_DNAME}" \
-not -path './.*/*' \
-not -path './.*' \
-not -path '*/__pycache__/*' \
-not -path '*/__pycache__' \
-not -path './librtl/ImgurApiKey.py' \
-not -name '*.exp' \
-not -name '*.lib' \
-not -name '*.obj' \
-not -name '*.sw*' \
-not -name "${0##*/}" |\
cpio --quiet -dLmp "${_release_dname}";
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;
else
zip -9 -r "${_release_fname##${RELEASES_DNAME}/}" "${_release_dname##${RELEASES_DNAME}/}";
fi;
cd "${OLDPWD}"; rm -fr "${_release_dname}";
};
usage() {
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 hr:v _opt; do
case "${_opt}" in
h) usage; exit 0; ;;
r) _rflag="${OPTARG}"; ;;
v) _vflag=1; ;;
*) usage; exit 1; ;;
esac; done;
shift $((${OPTIND}-1));
for _cmd in ${RELEASE_DEPS}; do
if ! which "${_cmd}" >/dev/null; then
echo "error: missing prerequisite command \`${_cmd}'";
exit 1;
fi;
done;
msgf "Building release...";
if [ "${_vflag:-0}" -eq 0 ]; then
deploy "${_rflag}" "${_vflag}" >/dev/null;
else
deploy "${_rflag}" "${_vflag}";
fi;
msgf "Built release.";
};
set -o errexit -o noglob;
main "${@}";
# vim:foldmethod=marker sw=8 ts=8 tw=120