Thanks to your help earlier in the week, I now have Gitlab running, able to 
spawn users & projects.  Now, I want a customization.

When a repo is created, I want some git config commands to run.  How to do 
so?

One example would be insert the same .gitignore in the top of every project 
that gets created.

Another example is accommodating some advice on the Sparkleshare website. 
I'll have some users running Sparkleshare to keep the repo up to date 
automatically.  On the Sparkleshare website, they suggest using a script to 
create projects on the server.  They have couple of settings I'd like to 
add to all repositories.  From their dazzle script 
(https://raw.githubusercontent.com/hbons/Dazzle/master/dazzle.sh) that 
creates repositories,  I will paste in a snippit

    $GIT init --quiet --bare "$DAZZLE_HOME/$1"
    # Don't allow force-pushing and data to get lost
    $GIT config --file "$DAZZLE_HOME/$1/config" receive.denyNonFastForwards true

    # Add list of files that Git should not compress
    EXTENSIONS="jpg jpeg png tiff gif psd xcf flac mp3 ogg oga avi mov mpg mpeg 
mkv ogv ogx webm zip gz bz xz bz2 rpm deb tgz rar ace 7z pak msi iso dmg"
    for EXTENSION in $EXTENSIONS; do
      sleep 0.05
      echo -ne "  -> echo \"*.$EXTENSION -delta\" >> 
$DAZZLE_HOME/$1/info/attributes      \r"
      echo "*.$EXTENSION -delta" >> "$DAZZLE_HOME/$1/info/attributes"
      sleep 0.05
      EXTENSION_UPPERCASE=`echo $EXTENSION | tr '[:lower:]' '[:upper:]'`
      echo -ne "  -> echo \"*.$EXTENSION_UPPERCASE -delta\" >> 
$DAZZLE_HOME/$1/info/attributes      \r"
      echo "*.$EXTENSION_UPPERCASE -delta" >> "$DAZZLE_HOME/$1/info/attributes"
    done


Looks like 1 config statement and a bunch of symbols to dump into a file 
called attributes. After that runs, the attributes file looks like so:

*.jpg -delta
*.JPG -delta
*.jpeg -delta
*.JPEG -delta
*.png -delta
*.PNG -delta
*.tiff -delta
*.TIFF -delta
*.gif -delta
*.GIF -delta
*.flac -delta
*.FLAC -delta
*.mp3 -delta
*.MP3 -delta
[snip]


I've been studying Gitlab hooks, but they seem to relate to commit events, 
not repository creation.

-- 
You received this message because you are subscribed to the Google Groups 
"GitLab" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/gitlabhq/dc3fb29a-2613-488e-a306-9748435ac081%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to