mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-21 23:25:08 +00:00
minor test
This commit is contained in:
parent
fe4fb34e8a
commit
d55d311263
@ -76,4 +76,4 @@ Bashbot is not more (in)secure as any other Bot written in any other language, w
|
||||
|
||||
If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
@ -123,5 +123,5 @@ That's it!
|
||||
If you feel that there's something missing or if you found a bug, feel
|
||||
free to submit a pull request!
|
||||
|
||||
latexmath:[\[VERSION\]] v0.70-dev2-21-g0cfb9f0
|
||||
latexmath:[\[VERSION\]] v0.70-dev2-24-gfe4fb34
|
||||
++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# description: Start or stop telegram-bash-bot
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
# shellcheck disable=SC2009
|
||||
# shellcheck disable=SC2181
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-23-ga7d14f6
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 sucess (hopefully)
|
||||
|
@ -5,7 +5,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
#
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2034
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
@ -7,7 +7,7 @@ GIT_DIR=$(git rev-parse --git-dir)
|
||||
cd "$GIT_DIR/.." || exit 1
|
||||
|
||||
export HOOKDIR="dev/hooks"
|
||||
|
||||
LASTPUSH='.git/.lastpush'
|
||||
|
||||
# if any command inside script returns error, exit and return that error
|
||||
set -e
|
||||
@ -38,3 +38,24 @@ else
|
||||
# something went wrong
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REMOTEVER="$(git ls-remote -t --refs 2>/dev/null | tail -1 | sed 's/.*\/v//')"
|
||||
VERSION="$(git describe --tags | sed -e 's/-.*//' -e 's/v//')"
|
||||
|
||||
|
||||
# LOCAL version must greater than latest REMOTE release version
|
||||
if (( $(echo "${VERSION} > ${REMOTEVER}" | bc -l) )); then
|
||||
# update version in bashbot files on push
|
||||
set +f
|
||||
[ -f "${LASTPUSH}" ] && LASTFILES="$(find ./* -newer "${LASTPUSH}")"
|
||||
[ "${LASTFILES}" = "" ] && exit
|
||||
echo -n " "
|
||||
# shellcheck disable=SC2086
|
||||
dev/version.sh ${LASTFILES} 2>/dev/null || exit 1
|
||||
echo " OK"
|
||||
else
|
||||
echo "Error: local version ${VERSION} must be greater than latest release version."
|
||||
echo "use \"git tag ...\" to create a local version greater than ${REMOTEVER}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-23-ga7d14f6
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
@ -7,11 +7,7 @@ GIT_DIR=$(git rev-parse --git-dir)
|
||||
cd "$GIT_DIR/.." || exit 1
|
||||
|
||||
export HOOKDIR="dev/hooks"
|
||||
|
||||
LASTPUSH='.git/.lastpush'
|
||||
REMOTEVER="$(git ls-remote -t --refs 2>/dev/null | tail -1 | sed 's/.*\/v//')"
|
||||
VERSION="$(git describe --tags | sed -e 's/-.*//' -e 's/v//')"
|
||||
|
||||
|
||||
# if any command inside script returns error, exit and return that error
|
||||
set -e
|
||||
@ -21,21 +17,5 @@ echo "............................"
|
||||
|
||||
unset IFS; set -f
|
||||
|
||||
# LOCAL version must greater than latest REMOTE release version
|
||||
if (( $(echo "${VERSION} > ${REMOTEVER}" | bc -l) )); then
|
||||
# update version in bashbot files on push
|
||||
set +f
|
||||
[ -f "${LASTPUSH}" ] && LASTFILES="$(find ./* -newer "${LASTPUSH}")"
|
||||
[ "${LASTFILES}" = "" ] && exit
|
||||
echo -n " "
|
||||
# shellcheck disable=SC2086
|
||||
dev/version.sh ${LASTFILES} 2>/dev/null || exit 1
|
||||
echo " OK"
|
||||
else
|
||||
echo "Error: local version ${VERSION} must be greater than latest release version."
|
||||
echo "use \"git tag ...\" to create a local version greater than ${REMOTEVER}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# note date of last push for version
|
||||
touch "${LASTPUSH}"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# this has to run once atfer git clone
|
||||
# and every time we create new hooks
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# this has to run once atfer git clone
|
||||
# and every time we create new hooks
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,3 +1,3 @@
|
||||
# list of additional files to check from shellcheck
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
bashbot.rc
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
# shellcheck disable=SC2016
|
||||
#
|
||||
# Easy Versioning in git:
|
||||
|
@ -61,5 +61,5 @@ The old format is supported for backward compatibility, but may fail for corner
|
||||
|
||||
#### [Next Create Bot](1_firstbot.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -62,5 +62,5 @@ group. This step is up to you actually.
|
||||
#### [Prev Installation](0_install.md)
|
||||
#### [Next Getting started](2_usage.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -166,5 +166,5 @@ send_action "${CHAT[ID]}" "action"
|
||||
#### [Prev Create Bot](1_firstbot.md)
|
||||
#### [Next Advanced Usage](3_advanced.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -156,5 +156,5 @@ answer_inline_query "$iQUERY_ID" "cached_sticker" "identifier for the sticker"
|
||||
#### [Prev Advanced Usage](3_advanced.md)
|
||||
#### [Next Expert Use](4_expert.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -104,5 +104,5 @@ An example crontab is provided in ```examples/bashbot.cron```.
|
||||
#### [Prev Expert Use](4_expert.md)
|
||||
#### [Next Best Practice](5_practice.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -141,5 +141,5 @@ The second warning is about an unused variable, this is true because in our exam
|
||||
#### [Prev Best Practice](5_practice.md)
|
||||
#### [Next Functions Reference](6_reference.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -445,5 +445,5 @@ Send Input from Telegram to waiting Interactive Chat.
|
||||
#### [Prev Best Practice](5_practice.md)
|
||||
#### [Next Notes for Developers](7_develop.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -71,5 +71,5 @@ fi
|
||||
#### [Prev Function Reference](6_function.md)
|
||||
#### [Next Bashbot Environment](8_custom.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -131,5 +131,5 @@ for every poll until the maximum of BASHBOT_SLEEP ms.
|
||||
|
||||
#### [Prev Notes for Developers](7_develop.md)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
|
||||
SHELL=/bin/sh
|
||||
|
@ -3,7 +3,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -3,7 +3,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -3,7 +3,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# adjust your language setting here
|
||||
# https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment
|
||||
|
@ -5,7 +5,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-23-ga7d14f6
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
#
|
||||
# source from commands.sh to use the aliases
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# source from commands.sh if you want ro use interactive or background jobs
|
||||
|
||||
|
@ -5,6 +5,6 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# source from commands.sh to use the inline functions
|
||||
|
@ -2,7 +2,7 @@
|
||||
# files: mycommands.sh.dist
|
||||
# copy to mycommands.sh and add all your commands and functions here ...
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
#
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2034
|
||||
|
@ -2,7 +2,7 @@
|
||||
#
|
||||
# ADD a new test skeleton to test dir, but does not activate test
|
||||
#
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# common variables
|
||||
export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# this has to run once atfer git clone
|
||||
# and every time we create new hooks
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# magic to ensure that we're always inside the root of our application,
|
||||
# no matter from which directory we'll run script
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
../dev/hooks/pre-commit.sh
|
||||
|
||||
|
2
test/a-push-test.sh
Executable file → Normal file
2
test/a-push-test.sh
Executable file → Normal file
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
../dev/hooks/pre-push.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
#### $$VERSION$$ v0.70-dev2-21-g0cfb9f0
|
||||
#### $$VERSION$$ v0.70-dev2-24-gfe4fb34
|
||||
|
||||
# include common functions and definitions
|
||||
# shellcheck source=test/ALL-tests.inc.sh
|
||||
|
Loading…
Reference in New Issue
Block a user