Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
2ea60eff
Commit
2ea60eff
authored
Jun 27, 2013
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create a script that builds the release.
parent
0792ee4e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
116 additions
and
29 deletions
+116
-29
RELEASE-PROCESS.md
RELEASE-PROCESS.md
+23
-28
configure.ac
c++/configure.ac
+1
-1
release.sh
release.sh
+92
-0
No files found.
RELEASE-PROCESS.md
View file @
2ea60eff
How to release
==============
*
Check out the master branch in a fresh directory. Do NOT use your regular repo, as the release
script commits changes and if anything goes wrong you'll probably want to trash the whole thing
without pushing.
*
Run
`super-test.sh`
on as many platforms as you have available. Remember that you can easily run
on any machine available through ssh using
`./super-test.sh remote [hostname]`
. Also run in
clang mode.
*
Create a new release branch, named release-VERSION, where VERSION is the current version number
except with
`-dev`
replaced by
`.0`
. E.g. 1.1-dev becomes 1.1.0.
*
In the master branch, bump the minor version number.
*
In the release branch, change the version numbers in both
`c++/configure.ac`
and
`compiler/capnproto-compiler.cabal`
, replacing
`-dev`
with
`.0-rc1`
. So, e.g., 1.1-dev becomes
1.
1.0-rc1.
*
Under the
`compiler`
directory, run
`cabal sdist`
to build a release candidate tarball.
*
Run
`./release.sh candidate`
. This creates a new release branch, updates the version number to
`-rc1`
, builds release tarballs, copies them to the current directory, then switches back to the
master branch and bumps the version number there.
*
Under the
`c++`
directory, use
`make distcheck`
to build a release candidate tarball.
*
Install your release candidates on your local machine.
*
Install your release candidates on your local machine, as if you were a user.
*
Go to
`c++/samples`
in the git repo and run
`./test.sh`
. It will try to build against your
installed copy.
*
Push changes to git for both the master and release branches.
*
Post the release candidates somewhere public and then send links to the mailing list for people
to test. Wait a bit for bug reports.
*
If there are any problems, fix them and start a new release candidate
`-rc2`
, repeating the
instructions above, and so on until the problem is fixed. Make sure to cherry-pick any changes
from the release branch back into the mainline.
*
If there are any problems, fix them in master and start a new release candidate by running
`./release.sh candidate <commit>...`
from the release branch. This will cherry-pick the specified
commits into the release branch and create a new candidate. Repeat until all problems are fixed.
Be sure that any such fixes include tests or process changes so that they don't happen again.
*
You should now be ready for an official release. Run
`./release.sh final`
.
*
You should now be ready for an official release. Remove the
`-rcN`
suffix from the verison
number and rebuild the release packages one last time. Post these publicly and update the links
on the site.
*
Upload the files and update the download links on the web site.
*
Write and publish a blog post discussing what is new.
*
Submit the blog post to
Hacker News and other places
.
*
Submit the blog post to
news sites and social media as you see fit
.
*
If problems are discovered in the release, make a new release branch forked from the current one
(not from master) with the micro version incremented by one and fix the problems there. Repeat
the release candidate process if the changes are complicated, or skip it and just publish if the
release is simple and obvious. Blog posts are usually not warranted for minor bugfix releases,
but the people reporting the bug should of course be told of the fix. Be sure to cherry-pick the
fix back into the mainline. If at all possible, include a test with your fix so that it doesn't
happen again. The test may be a unit test, an extension of
`super-test.sh`
, or a new step in the
release process.
*
If problems are discovered in the release, fix them in master and run
`./release.sh candidate <commit>...`
in the release branch to start a new micro release. The
script automatically sees that the current branch's version no longer contains
`-rc`
, so it starts
a new branch. Repeat the rest of the process above. Blog posts are usually not warranted for
minor bugfix releases, but the people reporting the bug should of course be told of the fix.
c++/configure.ac
View file @
2ea60eff
## Process this file with autoconf to produce configure.
AC_INIT([Capn Proto],[0.1-dev],[capnproto@googlegroups.com],[capnproto])
AC_INIT([Capn Proto],[0.1-dev],[capnproto@googlegroups.com],[capnproto
-c++
])
AC_CONFIG_SRCDIR([src/capnp/layout.c++])
AC_CONFIG_AUX_DIR([build-aux])
...
...
release.sh
0 → 100755
View file @
2ea60eff
#! /bin/bash
set
-euo
pipefail
doit
()
{
echo
"@@@@
$@
"
"
$@
"
}
BRANCH
=
$(
git rev-parse
--abbrev-ref
HEAD
)
case
"
$BRANCH
"
in
master
)
if
[
"x
${
1
:-}
"
!=
xcandidate
]
;
then
echo
"Parameter must be 'candidate' when starting from master branch."
>
&2
exit
1
fi
echo
"New major release."
VERSION
=
$(
grep
AC_INIT c++/configure.ac |
sed
-e
's/^.*],\[\([^]]*\)-dev].*$/\1/g'
)
echo
"Version:
$VERSION
.0"
echo
"========================================================================="
echo
"Creating release branch..."
echo
"========================================================================="
doit git checkout
-b
release-
$VERSION
.0
VERSION_REGEX
=
${
VERSION
/./[.]
}
-dev
doit
sed
-i
-e
"s/
$VERSION_REGEX
/
$VERSION
.0-rc1/g"
c++/configure.ac compiler/capnproto-compiler.cabal
doit git commit
-a
-m
"Set release branch version to
$VERSION
.0-rc1."
echo
"========================================================================="
echo
"Building compiler package..."
echo
"========================================================================="
cd
compiler
doit cabal configure
doit cabal sdist
doit
cp
dist/capnproto-compiler-
$VERSION
.0.tar.gz ../capnproto-compiler-
$VERSION
.0-rc1.tar.gz
doit cabal clean
cd
..
echo
"========================================================================="
echo
"Building C++ runtime package..."
echo
"========================================================================="
cd
c++
doit ./setup-autotools.sh
doit autoreconf
-i
doit ./configure
doit make dist
doit
cp
capnproto-c++-
$VERSION
.0-rc1.tar.gz ..
doit make maintainer-clean
cd
..
echo
"========================================================================="
echo
"Updating version in master branch..."
echo
"========================================================================="
doit git checkout master
declare
-a
VERSION_ARR
=(
${
VERSION
/./
}
)
NEXT_VERSION
=
${
VERSION_ARR
[0]
}
.
$((
VERSION_ARR[1]
+
1
))
doit
sed
-i
-e
"s/
$VERSION_REGEX
/
$NEXT_VERSION
-dev/g"
c++/configure.ac compiler/capnproto-compiler.cabal
doit git commit
-a
-m
"Set mainline version to
$NEXT_VERSION
-dev."
echo
"========================================================================="
echo
"Done"
echo
"========================================================================="
echo
"Ready to release:"
echo
" capnproto-compiler-
$VERSION
.0-rc1.tar.gz"
echo
" capnproto-c++-
$VERSION
.0-rc1.tar.gz"
echo
"Don't forget to push changes:"
echo
" git push origin master release-
$VERSION
.0"
;;
release-
*
)
if
[
"x
${
1
:-}
"
==
xcandidate
]
;
then
echo
"New release candidate."
echo
"NOT IMPLEMENTED"
>
&2
exit
1
elif
[
"x
${
1
:-}
"
==
xfinal
]
;
then
echo
"Final release."
echo
"NOT IMPLEMENTED"
>
&2
exit
1
else
echo
"Parameter must be either 'candidate' or 'final'."
>
&2
exit
1
fi
;;
*
)
echo
"Not a master or release branch."
>
&2
exit
1
esac
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment