RedmineBot
is a CLI tool help to post commit log to Redmine.
- Support linux.
- Better unit test.
- User custom template.
- Support much more Redmine REST API with CLI.
Any other suggestion? Feel free to create an issue or PR. π
$ brew install marcuswu0814/homebrew-taps/redminebot
# try it
$ redmine-bot version
Done. π
Step 1
Install all swift
dependency.
$ sudo apt-get install clang libicu-dev git build-essential libcurl4-openssl-dev
Step 2
Install swiftenv
, see install detail on document
For example, use zsh
$ git clone https://github.com/kylef/swiftenv.git ~/.swiftenv
$ echo 'export SWIFTENV_ROOT="$HOME/.swiftenv"' >> ~/.zshenv
$ echo 'export PATH="$SWIFTENV_ROOT/bin:$PATH"' >> ~/.zshenv
$ echo 'eval "$(swiftenv init -)"' >> ~/.zshenv
Then restart shell.
Step 3
Use swiftenv
to install swift
version 4.0.3
$ swiftenv install 4.0.3
Step 4
Clone RedmineBot
source code and build it with swift
$ git clone https://github.com/marcuswu0814/RedmineBot.git
$ cd RedmineBot/
$ make build-for-linux
# The bin name must be `redmine-bot`, don't rename it.
$ sudo mv .build/release/RedmineBot /usr/bin/redmine-bot
# try it
$ redmine-bot version
Done. π Then you can remove source code.
Note: Some linux build issue tracking on #10.
$ redmine-bot setup REDMINE_SERVER_URL API_ACCESS_KEY
Get API_ACCESS_KEY
from My account
page right hand side.
$ cd PATH_TO_YOUR_REPO
$ redmine-bot install-hook
Redmine-bot
will install post-commit
and post-rewrite
hook in specific repo. after execute install-hook
command.
Commit
$ cd PATH_TO_YOUR_REPO
$ touch testFile
$ git add --all
$ git commit -m "Commit for #123 and #255"
Every time you commited, post-commit
hook will run. And post commit message to Redmine
issue number #123
and #255
.
Rebase
$ cd PATH_TO_YOUR_REPO
$ git pull --rebase
If pull repo. from git server and not fast forward, commit will re-write, and post-rewrite
hook run.
Just like post-commit
, RedmineBot
will post a new note to let you know commit sha is updated.
$ redmine-bot uninstall-hook
Redmine-bot
will delete post-commit
and post-rewrite
hook after executing uninstall-hook
command.
If you find an issue or have questions, feel free to let me know. π