move spellcheck to pre commit

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-07-12 18:33:03 +02:00
parent e1084a8047
commit 0d3778fae0
5 changed files with 26 additions and 21 deletions

View File

@ -254,7 +254,7 @@ It features background tasks and interactive chats, and can serve as an interfac
<a class="sourceLine" id="cb6-3" title="3"></a> <a class="sourceLine" id="cb6-3" title="3"></a>
<a class="sourceLine" id="cb6-4" title="4"><span class="fu">wget</span> -t 1 -T 10 https://api.telegram.org/bot</a> <a class="sourceLine" id="cb6-4" title="4"><span class="fu">wget</span> -t 1 -T 10 https://api.telegram.org/bot</a>
<a class="sourceLine" id="cb6-5" title="5"><span class="co">#Connecting to api.telegram.org (api.telegram.org)|46.38.243.234|:443... failed: Connection timed out.</span></a></code></pre></div> <a class="sourceLine" id="cb6-5" title="5"><span class="co">#Connecting to api.telegram.org (api.telegram.org)|46.38.243.234|:443... failed: Connection timed out.</span></a></code></pre></div>
<p>Since Version 0.96 bashbot offers the option to recover from broken connections (aka blocked). Therefore you can provide a function named <code>bashbotBlockRecover()</code> in <code>mycommands.sh</code>. If the function exists it is called everytime when a broken connection is detected.</p> <p>Since Version 0.96 bashbot offers the option to recover from broken connections (aka blocked). Therefore you can provide a function named <code>bashbotBlockRecover()</code> in <code>mycommands.sh</code>. If the function exists it is called every time when a broken connection is detected.</p>
<p>Possible actions are: Check if network is working, change IP or simply wait some time.</p> <p>Possible actions are: Check if network is working, change IP or simply wait some time.</p>
<p>If everything seems OK return 0 for retry or any non 0 value to give up.</p> <p>If everything seems OK return 0 for retry or any non 0 value to give up.</p>
<div class="sourceCode" id="cb7"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb7-1" title="1"><span class="co"># called when bashbot sedn command failed because we can not connect to telegram</span></a> <div class="sourceCode" id="cb7"><pre class="sourceCode bash"><code class="sourceCode bash"><a class="sourceLine" id="cb7-1" title="1"><span class="co"># called when bashbot sedn command failed because we can not connect to telegram</span></a>
@ -268,6 +268,6 @@ It features background tasks and interactive chats, and can serve as an interfac
<p>@Gnadelwartz</p> <p>@Gnadelwartz</p>
<h2>That's it!</h2> <h2>That's it!</h2>
<p>If you feel that there's something missing or if you found a bug, feel free to submit a pull request!</p> <p>If you feel that there's something missing or if you found a bug, feel free to submit a pull request!</p>
<h4>$$VERSION$$ v0.99-dev2-5-g4d5b792</h4> <h4>$$VERSION$$ v0.99-dev2-6-gb641a18</h4>
</body> </body>
</html> </html>

View File

@ -259,4 +259,4 @@ bashbotBlockRecover() {
If you feel that there's something missing or if you found a bug, feel free to submit a pull request! If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
#### $$VERSION$$ v0.99-dev2-5-g4d5b792 #### $$VERSION$$ v0.99-dev2-6-gb641a18

View File

@ -322,7 +322,7 @@ failed: Connection timed out.
Since Version 0.96 bashbot offers the option to recover from broken connections Since Version 0.96 bashbot offers the option to recover from broken connections
(aka blocked). Therefore you can provide a function (aka blocked). Therefore you can provide a function
named `bashbotBlockRecover()` in `mycommands.sh`. If the function exists it is named `bashbotBlockRecover()` in `mycommands.sh`. If the function exists it is
called everytime when a broken connection is detected. called every time when a broken connection is detected.
Possible actions are: Check if network is working, change IP or simply wait Possible actions are: Check if network is working, change IP or simply wait
some time. some time.
@ -348,4 +348,4 @@ bashbotBlockRecover() {
If you feel that there's something missing or if you found a bug, feel free to If you feel that there's something missing or if you found a bug, feel free to
submit a pull request! submit a pull request!
#### $$VERSION$$ v0.99-dev2-5-g4d5b792 #### $$VERSION$$ v0.99-dev2-6-gb641a18

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v0.98-0-g5b5447e #### $$VERSION$$ v0.99-dev2-7-ge1084a8
############ ############
# NOTE: you MUST run install-hooks.sh again when updating this file! # NOTE: you MUST run install-hooks.sh again when updating this file!
@ -22,9 +22,10 @@ unset IFS; set -f
# check for shellcheck # check for shellcheck
if command -v shellcheck >/dev/null 2>&1; then if command -v shellcheck >/dev/null 2>&1; then
echo " Test all scripts with shellcheck ..." echo "Test all scripts with shellcheck ..."
echo "............................"
else else
echo "Error: shellcheck is not installed. Install shellcheck or delete $0" echo "Error: shellcheck is not installed. Please install shellcheck"
exit 1 exit 1
fi fi
@ -47,6 +48,8 @@ VERSION="$(git describe --tags | sed -e 's/-.*//' -e 's/v//' -e 's/,/./')"
# LOCAL version must greater than latest REMOTE release version # LOCAL version must greater than latest REMOTE release version
echo "Update Version of modified files"
echo "............................"
if (( $(echo "${VERSION} >= ${REMOTEVER}" | bc -l) )); then if (( $(echo "${VERSION} >= ${REMOTEVER}" | bc -l) )); then
# update version in bashbot files on push # update version in bashbot files on push
set +f set +f
@ -56,9 +59,21 @@ if (( $(echo "${VERSION} >= ${REMOTEVER}" | bc -l) )); then
# shellcheck disable=SC2086 # shellcheck disable=SC2086
dev/version.sh ${LASTFILES} 2>/dev/null || exit 1 dev/version.sh ${LASTFILES} 2>/dev/null || exit 1
echo " OK" echo " OK"
echo "............................"
else else
echo "Error: local version ${VERSION} must be greater or equal to release version ${REMOTEVER}." echo "Error: local version ${VERSION} must be equal to or greater then release version ${REMOTEVER}."
echo "use \"git tag ...\" to create a new local version" echo "use \"git tag vx.zz\" to create a new local version"
exit 1 exit 1
fi fi
if which codespell &>/dev/null; then
echo "Running codespell"
echo "............................"
codespell -B 1 --skip="*.log,*.html,*.txt,.git*" -L "ba"
echo "if there are (to many) typo's shown, consider running:"
echo "codespell -i 3 -w --skip=\"*.log,*.html,*.txt,.git*\" -L \"ba\""
else
echo "consider installing codespell: pip install codespell"
fi
echo "............................"

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#### $$VERSION$$ v0.98-0-g5b5447e #### $$VERSION$$ v0.99-dev2-7-ge1084a8
############ ############
# NOTE: you MUST run install-hooks.sh again when updating this file! # NOTE: you MUST run install-hooks.sh again when updating this file!
@ -20,15 +20,5 @@ echo "............................"
unset IFS; set -f unset IFS; set -f
if which codespell &>/dev/null; then
echo "Running codespell"
echo "............................"
codespell -B 1 --skip="*.log,*.html,*.txt,.git*" -L "ba"
echo "if there are (to many) typo's shown, consider running:"
echo "codespell -i 3 -w --skip=\"*.log,*.html,*.txt,.git*\" -L \"ba\""
else
echo "consider installing codespell: pip install codespell"
fi
echo "............................"
# note date of last push for version # note date of last push for version
touch "${LASTPUSH}" touch "${LASTPUSH}"