Skip to content
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

Merged
merged 1 commit into from
Dec 7, 2016
Merged

Add release script #316

merged 1 commit into from
Dec 7, 2016

Conversation

cdrage
Copy link
Member

@cdrage cdrage commented Nov 28, 2016

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:

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 28, 2016
@cdrage
Copy link
Member Author

cdrage commented Nov 28, 2016

@ngtuna This will change a lot in regards to releases:

  • faster (people can just cd script and run ./release.sh
  • using git shortlog instead of https://github.com/skywinder/Github-Changelog-Generator
  • removing v from versions. instead of v1.0.0 it'd be just 1.0.0 this can be changed to include v if you wish, it's just a developer preference.
  • can do release from the cli only
  • gpg signed releases with .asc key

@ngtuna
Copy link
Contributor

ngtuna commented Nov 28, 2016

@cdrage sounds great. Thanks. I will try it.

@kadel
Copy link
Member

kadel commented Nov 29, 2016

removing v from versions. instead of v1.0.0 it'd be just 1.0.0 this can be changed to include v if you wish, it's just a developer preference.

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
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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

@cdrage cdrage force-pushed the add-release-script branch 2 times, most recently from bf57369 to cbadcb3 Compare November 30, 2016 14:56
@cdrage
Copy link
Member Author

cdrage commented Nov 30, 2016

@kadel @ngtuna

Updated with the changes. Removed the sudo parts as well as add v prefix for each release ex. v1.0.0

@@ -0,0 +1,292 @@
#!/bin/bash

Copy link
Contributor

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?"
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

over ssh ?

Copy link
Member Author

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() {
Copy link
Contributor

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

Copy link
Member Author

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() {
Copy link
Contributor

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.

Copy link
Member Author

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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What ?

Copy link
Member Author

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.

@sebgoa
Copy link
Contributor

sebgoa commented Nov 30, 2016

@cdrage overall I am curious, did you write this script from scratch ? it seems to me this has been used in a different environment.

@cdrage
Copy link
Member Author

cdrage commented Nov 30, 2016

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
@cdrage
Copy link
Member Author

cdrage commented Dec 6, 2016

@sebgoa updated with your requested changes.

@sebgoa sebgoa merged commit e9f900e into kubernetes:master Dec 7, 2016
@cdrage cdrage deleted the add-release-script branch March 30, 2017 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants