git-secret/utils/gh-branch.sh

17 lines
256 B
Bash
Raw Normal View History

2016-02-23 21:11:37 +00:00
#!/usr/bin/env bash
2016-02-23 21:25:39 +00:00
set -e
2016-02-23 21:11:37 +00:00
function update_gh_branch {
2016-03-13 11:09:47 +00:00
local branch_name=$(git branch | grep '*' | sed 's/* //')
2016-02-23 21:11:37 +00:00
git checkout gh-pages
make
2016-02-23 21:25:39 +00:00
2016-02-23 21:28:45 +00:00
git add _posts
2016-02-23 21:25:39 +00:00
git commit -m 'documentation update'
2016-03-13 11:09:47 +00:00
git checkout "$branch_name"
2016-02-23 21:11:37 +00:00
}
update_gh_branch