Skip to content

Commit

Permalink
monthly release (#19728)
Browse files Browse the repository at this point in the history
* monthly release

* fix

* exit 0
  • Loading branch information
Alancere authored Dec 26, 2022
1 parent 3ceaba2 commit 575bc88
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions eng/scripts/mgmt-auto-release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/bin/bash
set -ex

today=`date "+%Y%m%d"`
firstDay=`date -d "${today}" +%Y%m01`
week=`date -d "$firstDay" +%w`
secondSaturday=$((firstDay+(12 - week) % 7 + 8))

if [ $today -gt $secondSaturday ]
then
echo "The PR generation time of the current month is: [$firstDay-$secondSaturday]"
exit 0
fi

export PATH=$PATH:$HOME/go/bin
git config --global user.email "ReleaseHelper"
git config --global user.name "ReleaseHelper"
Expand Down

0 comments on commit 575bc88

Please sign in to comment.