mirror of
https://github.com/He4eT/oddsquat.git
synced 2026-05-04 20:37:22 +00:00
tools: release script for github pages
This commit is contained in:
parent
4e7ddd931f
commit
231925c47c
1 changed files with 23 additions and 0 deletions
23
tools/gh.release.sh
Executable file
23
tools/gh.release.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#! /bin/bash
|
||||
|
||||
GIT_ROOT=`git rev-parse --show-toplevel`
|
||||
|
||||
CURRENT_TIMESTAMP=`date +"%Y-%m-%d-%H%M%S"`
|
||||
|
||||
RELEASE_BRANCH='release'
|
||||
BUILD_DIR='docs'
|
||||
|
||||
git checkout master
|
||||
git branch -D $RELEASE_BRANCH
|
||||
git checkout -b $RELEASE_BRANCH
|
||||
|
||||
rm -rf "$GIT_ROOT/$BUILD_DIR"
|
||||
npm run build
|
||||
|
||||
git add "$GIT_ROOT/$BUILD_DIR"
|
||||
git commit -m "release: $CURRENT_TIMESTAMP"
|
||||
|
||||
git push -f origin $RELEASE_BRANCH
|
||||
|
||||
rm -rf "$GIT_ROOT/$BUILD_DIR"
|
||||
git checkout master
|
||||
Loading…
Add table
Add a link
Reference in a new issue