From 4879a03c60353a65257add190fdbd2fddd7dd69c Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Mon, 21 Sep 2009 19:01:47 +0530 Subject: [PATCH] Makefile wraps "git archive" to record "git describe" output in tar --- .gitignore | 4 ++++ Makefile | 16 ++++++++++++++++ doc/0-INSTALL.mkd | 14 ++++++++++++-- 3 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f60da1e --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.tar +*.tgz +*.tar.gz +*.tar.bz2 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..730fa72 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +# this is a simple wrapper around "git archive" using make + +# "make [refname].tar" produces a tar of refname, then adds a file containing +# the "git describe" output for that refname to the tar. This lets you say +# "cat .GITOLITE-VERSION" to find out which ref produced this tar + +# Note: I'm not sure if that "-r" is a GNU tar extension... + +.GITOLITE-VERSION: + @touch .GITOLITE-VERSION + +%.tar: .GITOLITE-VERSION + git describe --all --long $* > .GITOLITE-VERSION + git archive $* > $@ + tar -r -f $@ .GITOLITE-VERSION + rm .GITOLITE-VERSION diff --git a/doc/0-INSTALL.mkd b/doc/0-INSTALL.mkd index 10450a2..9d92ce9 100644 --- a/doc/0-INSTALL.mkd +++ b/doc/0-INSTALL.mkd @@ -13,9 +13,19 @@ A major objective is to allow use by people without root access, permissions to create other userids, etc. Even if you have root, please add a user just for gitolite and do all this from that user. -### quick install +### getting a tar file from a clone - * cd to the directory where you unpacked the source +You can clone the repo from github, then execute a make command to extract a +tar file of the branch you want. Please use the make command, not a plain +"git archive". The comments in the `Makefile` will explain why. + + git clone git://github.com/sitaramc/gitolite.git + make master.tar + # or maybe "make rebel.tar" or "make pu.tar" + +### quick install from tar file + + * make a temp directory somewhere, cd to it, and unpack the tar file * run `src/install.pl` and follow the prompts **When you are told to edit some file, please read the comments in the file**.