git-server

git server-side stuff | stagit
git clone git://git.ckyln.com/~cem/hooks.git
Log | Files | Refs | README

README (3714B)


      1 git server stuff
      2 --------------------------------------------------------------------------------
      3 
      4 Scripts and hooks I use to create my stagit page among with other stuff such as
      5 tarball creation and raw file serving.
      6 
      7 This is the _incarnation_ of stagitbuild[1], which was one of my first shell
      8 programs (I put it under VCS months after its creation). It rebuilt the whole
      9 website on a git push (with tarball creation) which took up to 10 whole seconds.
     10 It had terrible code quality and I tried fixing it, but it obviously needed a
     11 rewrite.
     12 
     13 
     14 setting up
     15 --------------------------------------------------------------------------------
     16 
     17 Using the scripts (not the hooks) require the '$GIT_CONFDIR' variable to be set
     18 to this directory.
     19 
     20 You will need to copy the default configuration and edit it to set your website
     21 directory along with other configuration options, which are briefly explained
     22 in the file itself.
     23 
     24   +--------------------------------------------------------------------------+
     25   | $ cp config.def config                                                   |
     26   | $ vi config                                                              |
     27   +--------------------------------------------------------------------------+
     28 
     29 If you want to manage an existing repository under this hook, you can do it by
     30 linking its post-receive hook
     31 
     32   +--------------------------------------------------------------------------+
     33   | $ ln -sf $PWD/post-receive /path/to/repo/hooks/post-receive              |
     34   +--------------------------------------------------------------------------+
     35 
     36 You can also use the `mkrepo` script in order to create a new repository that is
     37 meant to be managed by this program. The following example will create a
     38 repository named 'awesome-repo' with the description 'This is descriptive'. It
     39 will then create empty files named 'raw' and 'archive'.
     40 
     41   +--------------------------------------------------------------------------+
     42   | # Syntax: mkrepo [repo] [description] [file...]                          |
     43   | $ mkrepo awesome-repo "This is descriptive" raw archive                  |
     44   +--------------------------------------------------------------------------+
     45 
     46 
     47 special files
     48 --------------------------------------------------------------------------------
     49 
     50 The post-receive hook looks for certain files which changes the way the script
     51 behaves. These files are as follows.
     52 
     53 - raw     :: If this file exists, the script will create raw files out of every
     54              branch.
     55 
     56 - archive :: If this file exists, the script will create archives out of every
     57              tag and every branch.
     58 
     59 - mirrors :: If this file exists, the script will mirror the repository to
     60              every listed link. Example mirros file:
     61 
     62              +------------------------------------------------------------+
     63              | git@github.com:user/awesome-repo.git                       |
     64              | git@gitlab.com:user/awesome.git                            |
     65              +------------------------------------------------------------+
     66 
     67 
     68 - owner   :: Unless this file exists, the script will create its own as defined
     69              by the configuration.
     70 
     71 - url     :: Unless this file exists, the script will create its own as defined
     72              by the configuration.
     73 
     74 - hooks/post-receive.extra
     75   If this file exists, post-receive hook will source it after it is done.
     76 
     77 
     78 dependencies
     79 --------------------------------------------------------------------------------
     80 
     81 These hooks obviously depend on
     82 - git
     83 - stagit[2]
     84 
     85 
     86 references
     87 --------------------------------------------------------------------------------
     88 [1]: https://github.com/cemkeylan/stagitbuild
     89 [2]: https://codemadness.org/git/stagit