github-readme-stats/scripts/push-theme-readme.sh
Anurag Hazra f7f8ee7ba0
docs(theme): Auto update theme readme (#232)
Co-authored-by: Github Readme Stats Bot <hazru.anurag@gmail.com>
2020-07-28 17:17:30 +05:30

14 lines
509 B
Bash
Executable File

#!/bin/bash
set -x
set -e
export BRANCH_NAME=updated-theme-readme
git --version
git config --global user.email "no-reply@githubreadmestats.com"
git config --global user.name "Github Readme Stats Bot"
git branch -d $BRANCH_NAME || true
git checkout -b $BRANCH_NAME
git add --all
git commit --message "docs(theme): Auto update theme readme" || exit 0
git remote add origin-$BRANCH_NAME https://${PERSONAL_TOKEN}@github.com/${GH_REPO}.git
git push --force --quiet --set-upstream origin-$BRANCH_NAME $BRANCH_NAME