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>
J. Bruce Fields committed
May 13, 2007 at 00:14 UTC
82c8bf28f8e4b5d2c647289abccb69b5fe69d3b1
2 files changed
+42
-52
Documentation/howto/make-dist.txt
deleted
-52
@@ -1,52 +0,0 @@
1
-Date: Fri, 12 Aug 2005 22:39:48 -0700 (PDT)
2
-From: Linus Torvalds <torvalds@osdl.org>
3
-To: Dave Jones <davej@redhat.com>
4
-cc: git@vger.kernel.org
5
-Subject: Re: Fwd: Re: git checkout -f branch doesn't remove extra files
6
-Abstract: In this article, Linus talks about building a tarball,
7
- incremental patch, and ChangeLog, given a base release and two
8
- rc releases, following the convention of giving the patch from
9
- the base release and the latest rc, with ChangeLog between the
10
- last rc and the latest rc.
11
-
12
-On Sat, 13 Aug 2005, Dave Jones wrote:
13
->
14
-> > Git actually has a _lot_ of nifty tools. I didn't realize that people
15
-> > didn't know about such basic stuff as "git-tar-tree" and "git-ls-files".
16
->
17
-> Maybe its because things are moving so fast :) Or maybe I just wasn't
18
-> paying attention on that day. (I even read the git changes via RSS,
19
-> so I should have no excuse).
20
-
21
-Well, git-tar-tree has been there since late April - it's actually one of
22
-those really early commands. I'm pretty sure the RSS feed came later ;)
23
-
24
-I use it all the time in doing releases, it's a lot faster than creating a
25
-tar tree by reading the filesystem (even if you don't have to check things
26
-out). A hidden pearl.
27
-
28
-This is my crappy "release-script":
29
-
30
- [torvalds@g5 ~]$ cat bin/release-script
31
- #!/bin/sh
32
- stable="$1"
33
- last="$2"
34
- new="$3"
35
- echo "# git-tag v$new"
36
- echo "git-tar-tree v$new linux-$new | gzip -9 > ../linux-$new.tar.gz"
37
- echo "git-diff-tree -p v$stable v$new | gzip -9 > ../patch-$new.gz"
38
- echo "git-rev-list --pretty v$new ^v$last > ../ChangeLog-$new"
39
- echo "git-rev-list --pretty=short v$new ^v$last | git-shortlog > ../ShortLog"
40
- echo "git-diff-tree -p v$last v$new | git-apply --stat > ../diffstat-$new"
41
-
42
-and when I want to do a new kernel release I literally first tag it, and
43
-then do
44
-
45
- release-script 2.6.12 2.6.13-rc6 2.6.13-rc7
46
-
47
-and check that things look sane, and then just cut-and-paste the commands.
48
-
49
-Yeah, it's stupid.
50
-
51
- Linus
52
-
Documentation/user-manual.txt
+42
@@ -808,6 +808,48 @@ available
808
Which shows that e05db0fd is reachable from itself, from v1.5.0-rc1, and
809
from v1.5.0-rc2, but not from v1.5.0-rc0.
810
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.
853
854
[[Developing-with-git]]
855
Developing with git