Skip to content

Commit 82c8bf2

Browse files
author
J. Bruce Fields
committed
user-manual: move howto/make-dist.txt into user manual
There seems to be a perception that the howto's are bit-rotting a little. The manual might be a more visible location for some of them, and make-dist.txt seems like a good candidate to include as an example in the manual. For now, incorporate much of it verbatim. Later we may want to update the example a bit. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
1 parent 4db75b7 commit 82c8bf2

File tree

2 files changed

+42
-52
lines changed

2 files changed

+42
-52
lines changed

Documentation/howto/make-dist.txt

Lines changed: 0 additions & 52 deletions
This file was deleted.

Documentation/user-manual.txt

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,48 @@ available
808808
Which shows that e05db0fd is reachable from itself, from v1.5.0-rc1, and
809809
from v1.5.0-rc2, but not from v1.5.0-rc0.
810810

811+
[[making-a-release]]
812+
Creating a changelog and tarball for a software release
813+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
814+
815+
The gitlink:git-archive[1] command can create a tar or zip archive from
816+
any version of a project; for example:
817+
818+
-------------------------------------------------
819+
$ git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz
820+
-------------------------------------------------
821+
822+
will use HEAD to produce a tar archive in which each filename is
823+
preceded by "prefix/".
824+
825+
If you're releasing a new version of a software project, you may want
826+
to simultaneously make a changelog to include in the release
827+
announcement.
828+
829+
Linus Torvalds, for example, makes new kernel releases by tagging them,
830+
then running:
831+
832+
-------------------------------------------------
833+
$ release-script 2.6.12 2.6.13-rc6 2.6.13-rc7
834+
-------------------------------------------------
835+
836+
where release-script is a shell script that looks like:
837+
838+
-------------------------------------------------
839+
#!/bin/sh
840+
stable="$1"
841+
last="$2"
842+
new="$3"
843+
echo "# git tag v$new"
844+
echo "git archive --prefix=linux-$new/ v$new | gzip -9 > ../linux-$new.tar.gz"
845+
echo "git diff v$stable v$new | gzip -9 > ../patch-$new.gz"
846+
echo "git log --no-merges v$new ^v$last > ../ChangeLog-$new"
847+
echo "git shortlog --no-merges v$new ^v$last > ../ShortLog"
848+
echo "git diff --stat --summary -M v$last v$new > ../diffstat-$new"
849+
-------------------------------------------------
850+
851+
and then he just cut-and-pastes the output commands after verifying that
852+
they look OK.
811853

812854
[[Developing-with-git]]
813855
Developing with git

0 commit comments

Comments
 (0)