-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add release script #316
Add release script #316
Conversation
@ngtuna This will change a lot in regards to releases:
|
5d306b9
to
dbaaba3
Compare
@cdrage sounds great. Thanks. I will try it. |
I would vote for keeping 'v' as we already started doing that. |
# Tarball it! | ||
cp -r $CLI $CLI-$1 | ||
sudo rm -rf $CLI-$1/.git* | ||
sudo tar czf $CLI-$1.tar.gz $CLI-$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is sudo
really required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, i'll remove it.
cd $CLI | ||
git remote remove origin | ||
git remote add origin git@github.com:$ORIGIN_REPO/$CLI.git | ||
git checkout -b release-$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we drop release-
prefix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kadel release prefix is only for making the PR. so the PR would have the prefix release-0-1-0. Doesn't matter what the branch name is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah now i get it. It is name of the branch in your fork.
than ok
bf57369
to
cbadcb3
Compare
@@ -0,0 +1,292 @@ | |||
#!/bin/bash | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing license header
|
||
requirements() { | ||
if [ ! -f /usr/bin/git ] && [ ! -f /usr/local/bin/git ]; then | ||
echo "No git. What's wrong with you?" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove those "what's wrong with you". I understand it is funny, but some folks may not like it.
|
||
# Clone and then change to user's upstream repo for pushing to master / opening PR's :) | ||
clone() { | ||
git clone ssh://git@github.com/$UPSTREAM_REPO/$CLI.git |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
over ssh ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebgoa yes, git is used a lot in the script, much easier over ssh authentication.
cd .. | ||
} | ||
|
||
changelog_md() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ngtuna does not create the CHANGELOG like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebgoa I did see that. I find that git shortlog
looks a lot cleaner / simpler. Although that's just my opinion.
cd .. | ||
} | ||
|
||
sign() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would skip the signing until there is a incubator wide process for determining who can sign code and what keys can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've gone ahead and removed this.
echo "!!!" | ||
echo "https://github.com/$UPSTREAM_REPO/$CLI/releases/edit/$1" | ||
echo "!!!" | ||
echo "REMEMBER TO UPDATE DOCKER BUILDS! :D" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebgoa this was accidentally left in from a previous project, I'll remove this.
@cdrage overall I am curious, did you write this script from scratch ? it seems to me this has been used in a different environment. |
@sebgoa I wrote it from scratch for multiple projects. See: |
This adds a release script automating the changelog, notes as well as release (to GitHub) via the CLI / a simple script. The caveat is the next release will have to have `v` removed from the title in order for `changelog()` function to work correctly. Some changes to all upcoming releases are: - Using `git shortlog` instead of https://github.com/skywinder/Github-Changelog-Generator
cbadcb3
to
2511c73
Compare
@sebgoa updated with your requested changes. |
This adds a release script automating the changelog, notes as well as
release (to GitHub) via the CLI / a simple script.
The caveat is the next release will have to have
v
removed from thetitle in order for
changelog()
function to work correctly.Some changes to all upcoming releases are:
git shortlog
instead ofhttps://github.com/skywinder/Github-Changelog-Generator