Version 0.61 of bashbot

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-04-19 14:07:01 +02:00
parent 3b17bc2e39
commit b5a30dc2ba
17 changed files with 38 additions and 34 deletions

View File

@ -102,4 +102,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$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -31,13 +31,17 @@ Install bashbot
* your $HOME directory (install and run with your user-ID)
* /usr/local if you want to run as service
2. https://github.com/topkecleon/telegram-bot-bash/releases[Download
latest release archive from github] and unpack it.
If you want the current version from github, clone the repository:
`git clone https://github.com/topkecleon/telegram-bot-bash` 3. Change
directory to `telegram-bot-bash` and run `./bashbot.sh init`. Now follow
the instructions. At one point you are asked for your Bots token given
by botfather.
latest release] archive from github and extract all files.
+
As an alternative you can clone the github repository to get the latest,
but possible unstable improvements.
+
....
git clone https://github.com/topkecleon/telegram-bot-bash
....
3. Go to directory `telegram-bot-bash`, run `./bashbot.sh init` and
follow the instructions. At this point you are asked for your Bots token
given by botfather.
Update bashbot
~~~~~~~~~~~~~~
@ -162,5 +166,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\]] 0.70-dev-6-g3fb7796
+++++++++++++++++++++++++++++++++++++++++++
latexmath:[\[VERSION\]] v0.61-0-g3b17bc2
++++++++++++++++++++++++++++++++++++++++

View File

@ -1,7 +1,7 @@
#!/bin/sh
# description: Start or stop telegram-bash-bot
#
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
# shellcheck disable=SC2009
# shellcheck disable=SC2181

View File

@ -10,7 +10,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
#
# Exit Codes:
# - 0 sucess (hopefully)

View File

@ -4,7 +4,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
#
# shellcheck disable=SC2154
# shellcheck disable=SC2034

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -1,5 +1,5 @@
# list of files to run shellscheck against
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
# main files
bashbot.sh
commands.sh

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
# this has to run once atfer git clone
# and every time we create new hooks
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
# magic to ensure that we're always inside the root of our application,
# no matter from which directory we'll run script

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2
# shellcheck disable=SC2016
#
# Easy Versioning in git:

View File

@ -61,5 +61,5 @@ group. This step is up to you actually.
#### [Next Getting started](2_usage.md)
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -159,5 +159,5 @@ send_action "${CHAT[ID]}" "action"
#### [Prev Create Bot](1_firstbot.md)
#### [Next Advanced Usage](3_advanced.md)
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -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$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -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$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -112,5 +112,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$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -348,5 +348,5 @@ Send Input from Telegram to waiting Interactive Chat.
#### [Prev Best Practice](5_practice.md)
#### [Next Developer Rules](7_develop.md)
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2

View File

@ -1,24 +1,24 @@
#### [Home](../README.md)
## Notes for bashbot developers
This section is about help and best pratices for new bashbot developers. The main focus on creating new versions of bashbot, not on develop an individual bot. Nevertheless rules and tools described can also applied to your bot development.
This section is about help and best pratices for new bashbot developers. The main focus on is creating new versions of bashbot, not on develop your individual bot. Nevertheless the rules and tools described here can also help you with your bot development.
Bashbot development is done on gitbub. If you want to provide fixes or new features fork bashbot on githup and provide changes as pull request.
bashbot development is done on github. If you want to provide fixes or new features [fork bashbot on githup](https://help.github.com/en/articles/fork-a-repo) and provide changes as [pull request on github](https://help.github.com/en/articles/creating-a-pull-request).
### Setup your develop environment
1. install git, install [shellcheck](5_practice.md#Test-your-Bot-with-shellcheck)
2. setup your [environment for UTF-8](4_expert.md#Setting-up-your-Environment)
3. clone your bashbot fork to a new directory ```git clone https://github.com/<YOURNAME>/telegram-bot-bash.git```, replace <YOURNAME> with your username on github
4. create and change to your develop branch ```git checkout -b <YOURBRANCH>```, replace <YOURBRANCH> with the name you want to name it, e.g. 'develop'
3. clone your bashbot fork to a new directory ```git clone https://github.com/<YOURNAME>/telegram-bot-bash.git```, replace ```<YOURNAME>``` with your username on github
4. create and change to your develop branch ```git checkout -b <YOURBRANCH>```, replace ```<YOURBRANCH>``` with the name you want to name it, e.g. 'develop'
5. give your (dev) fork a new version tag: ```git tag vx.xx```, version must be higher than current version
6. setup github hooks by running ```dev/install-hooks.sh``` (optional)
### Versioning
Bashbot is tagged with version numbers. If you start new development you must tag your fork with a new version higher than the current version.
If you fork 'v0.60' the next develop version should tagged as e.g. ```git tag "v0.61-dev"``` for fixes or ```git tag "v0.70-dev"``` for new features.
Bashbot is tagged with version numbers. If you start a new development cycle you must tag your fork with a version higher than the current version.
E.g. if you fork 'v0.60' the next develop version should tagged as ```git tag "v0.61-dev"``` for fixes or ```git tag "v0.70-dev"``` for new features.
To get the current version name of your dev fork run ```git describe --tags```. The output will something like '0.70-dev-6-g3fb7796', where your version tag is followed by the number of commits since you tag your version and the latest commit hash. see also [comments in version.sh](../dev/version.sh)
To get the current version name of your develepment fork run ```git describe --tags```. The output looks like ```v0.70-dev-6-g3fb7796``` where your version tag is followed by the number of commits since you tag your branch and followed by the latest commit hash. see also [comments in version.sh](../dev/version.sh)
To update the Version Number in your scripts run ```dev/version.sh```, it will update the line '#### $$VERSION$$ ###' in all files to the current version name.
@ -26,12 +26,12 @@ If you actived git hooks in Setup step 6, 'version.sh' updates the version name
### Shellchecking
For a shell script running as a service it's important to be paranoid about quoting, globbing and ohter common problems. So it's a must to run shellchek on all shell scripts before you commit a change. this is done by a git hook activated in Setup step 6.
For a shell script running as a service it's important to be paranoid about quoting, globbing and other common problems. So it's a must to run shellchek on all shell scripts before you commit a change. this is automated by a git hook activated in Setup step 6.
You can run shellcheck manually on every file or run ```dev/hooks/pre-commit.sh``` to run shellcheck for all files given in 'dev/hooks/shellcheck.files'.
In addition you can run ```dev/hooks/pre-commit.sh``` every time you want to shellcheck all files given in 'dev/hooks/shellcheck.files'.
#### [Prev Function Reference](6_function.md)
#### $$VERSION$$ 0.70-dev-6-g3fb7796
#### $$VERSION$$ v0.61-0-g3b17bc2