Skip to content

Commit

Permalink
Automatically update tags to $CIRCLE_TAG
Browse files Browse the repository at this point in the history
Closes #19
  • Loading branch information
arekkas committed Jun 13, 2018
1 parent db30371 commit b745bd3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:
- VERSION: latest
steps:
- checkout
- run: >
if [ -z ${CIRCLE_TAG+x} ]; then find ./guides/ -name "*.md" -type f -print0 | xargs -0 sed -i 's/'$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))'/'${CIRCLE_TAG}'/g'; fi
- run: yarn install
- run: yarn build
- run: git config --global user.email "hi@ory.am"
Expand Down Expand Up @@ -50,7 +52,9 @@ jobs:
command: ./.circleci/tag.sh
- run: cat ./guides/book.json
- run: cat ./guides/package.json
- run: "git commit -a -m \"Updates book.json to version ${CIRCLE_TAG}\""
- run: >
find ./guides/ -name "*.md" -type f -print0 | xargs -0 sed -i 's/'$(git describe --abbrev=0 --tags $(git rev-list --tags --skip=1 --max-count=1))'/'${CIRCLE_TAG}'/g'
- run: "git commit -a -m \"Updates guides to version ${CIRCLE_TAG}\""
- run: git remote rm origin
- run: git remote add origin https://arekkas:$GITHUB_TOKEN@github.com/ory/docs.git
- run: git push origin HEAD:master
Expand Down

0 comments on commit b745bd3

Please sign in to comment.