-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
# Collect change log info | ||
CHANGES="## [$1] - $(date +'%Y-%m-%d')"$'\n' | ||
echo "Enter changes:" | ||
while : ; do | ||
read CHANGE | ||
if [ "$CHANGE" = "" ]; then | ||
break | ||
fi | ||
|
||
CHANGES="$CHANGES- $CHANGE"$'\n' | ||
done | ||
|
||
# Rebase | ||
git checkout master | ||
git fetch && git rebase origin | ||
|
||
# Update the version number in redfishMockupCreate.py | ||
sed -i -E 's/tool_version = .+/tool_version = "'$1'"/' redfishMockupCreate.py | ||
sed -i -E 's|tool_date = .+|tool_date = "'$(date +'%m/%d/%Y')'"|' redfishMockupCreate.py | ||
|
||
# Update the change log file | ||
ex CHANGELOG.md <<eof | ||
3 insert | ||
$CHANGES | ||
. | ||
xit | ||
eof | ||
|
||
# Commit and push changes | ||
git add CHANGELOG.md redfishMockupCreate.py | ||
git commit -m "$1 versioning" | ||
git push origin master | ||
|
||
# Make new release in GitHub | ||
CHANGES="Changes since last release:"$'\n\n'"$CHANGES" | ||
gh release create $1 -n "$CHANGES" |