File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3- set -euo pipefail
3+ set -eo pipefail
44
55LATEST=$( curl --fail " https://api.github.com/repos/lycheeverse/lychee/releases/latest" | jq -er " .name" )
66FILE=src/generate/lychee-version.ts
77
88sed -i -e " s/LYCHEE_VERSION = \" [^\" ]*\" /LYCHEE_VERSION = \" $LATEST \" /" $FILE
99
10+ if [ -n " $CI " ]; then
11+ git config user.name " lychee bot"
12+ git config user.email " noreply@lychee.cli.rs"
13+ fi
14+
1015if git status --porcelain | grep $FILE ; then
1116 echo New version found: $LATEST
1217 git add $FILE
1318 BRANCH=" bump-$LATEST "
1419 MESSAGE=" Bump lychee: $LATEST "
1520 git checkout -b $BRANCH
1621 git add $FILE
17- git config user.name " lychee bot"
18- git config user.email " noreply@lychee.cli.rs"
1922 git commit --message " $MESSAGE "
2023 git push -u origin $BRANCH
2124 gh pr create -B master -H $BRANCH --title " $MESSAGE " --body ' Created by Github action'
You can’t perform that action at this time.
0 commit comments