mirror of
https://github.com/lalbornoz/roar.git
synced 2024-11-23 07:36:37 +00:00
assets/shell/bump-version.sh: melp?
This commit is contained in:
parent
7eb8d20ed4
commit
9aaf6fdd3b
@ -15,7 +15,7 @@ usage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
local _opt="" _version_new="" _version_old="";
|
local _opt="" _version_new="" _version_new_code="" _version_old="";
|
||||||
while getopts hv _opt; do
|
while getopts hv _opt; do
|
||||||
case "${_opt}" in
|
case "${_opt}" in
|
||||||
h) usage; exit 0; ;;
|
h) usage; exit 0; ;;
|
||||||
@ -28,6 +28,7 @@ main() {
|
|||||||
echo "error: empty or missing new version number argument" >&2; usage; exit 1;
|
echo "error: empty or missing new version number argument" >&2; usage; exit 1;
|
||||||
else
|
else
|
||||||
_version_old="${1}"; _version_new="${2}";
|
_version_old="${1}"; _version_new="${2}";
|
||||||
|
_version_new_code="$(echo "${_version_new}" | sed -e 's,\.,,g' -e 's/^[0-9]/&00/')";
|
||||||
fi;
|
fi;
|
||||||
for _cmd in ${RELEASE_DEPS_CMD}; do
|
for _cmd in ${RELEASE_DEPS_CMD}; do
|
||||||
if ! which "${_cmd}" >/dev/null; then
|
if ! which "${_cmd}" >/dev/null; then
|
||||||
@ -35,13 +36,20 @@ main() {
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi;
|
fi;
|
||||||
done;
|
done;
|
||||||
rc sed -i"" '/"version":/s/\("version":\s*\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
|
||||||
asciiblaster-cordoba/package.json \
|
|
||||||
asciiblaster-cordoba/package-lock.json \
|
|
||||||
asciiblaster-nw/package.json \
|
|
||||||
asciiblaster-nw/package-lock.json;
|
|
||||||
rc sed -i"" '/version="/s/\(version=\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
rc sed -i"" '/version="/s/\(version=\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
||||||
asciiblaster-cordoba/config.xml;
|
asciiblaster-cordoba/config.xml;
|
||||||
|
rc sed -i"" '/"version":/s/\("version":\s*\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
||||||
|
asciiblaster-cordoba/package.json \
|
||||||
|
asciiblaster-cordoba/package-lock.json;
|
||||||
|
rc sed -i"" '/android:versionCode="/s/\(android:versionCode=\)"[0-9]\+"/\1"'"${_version_new_code}"'"/' \
|
||||||
|
asciiblaster-cordoba/platforms/android/app/src/main/AndroidManifest.xml;
|
||||||
|
rc sed -i"" '/android:versionName="/s/\(android:versionName=\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
||||||
|
asciiblaster-cordoba/platforms/android/app/src/main/AndroidManifest.xml;
|
||||||
|
rc sed -i"" '/version="/s/\(version=\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
||||||
|
asciiblaster-cordoba/platforms/android/app/src/main/res/xml/config.xml;
|
||||||
|
rc sed -i"" '/"version":/s/\("version":\s*\)"'"${_version_old}"'"/\1"'"${_version_new}"'"/' \
|
||||||
|
asciiblaster-nw/package.json \
|
||||||
|
asciiblaster-nw/package-lock.json;
|
||||||
rc sed -i"" '/<title>[^<]\+ v/s/\(<title>[^<]\+ v\)'"${_version_old}"'\(<\)/\1'"${_version_new}"'\2/' \
|
rc sed -i"" '/<title>[^<]\+ v/s/\(<title>[^<]\+ v\)'"${_version_old}"'\(<\)/\1'"${_version_new}"'\2/' \
|
||||||
index.html;
|
index.html;
|
||||||
rc rsync -aiLPv --delete \
|
rc rsync -aiLPv --delete \
|
||||||
|
Loading…
Reference in New Issue
Block a user