Beispiel #1
0
def setupGitHooksIfNotSetup():
  # Check that the git hooks folder is all set up, and set it up if it isn't
  gitHooksFolder = '.git/hooks'

  customHooksFolder = 'git-tools/git-hooks'
  assert exists(customHooksFolder)
  target = relpath(abspath(customHooksFolder), split(gitHooksFolder)[0])
  createSymlinkIfNotExistsOrStale(target, gitHooksFolder)
Beispiel #2
0
def setupGitHooksIfNotSetup():
    # Check that the git hooks folder is all set up, and set it up if it isn't
    gitHooksFolder = '.git/hooks'

    customHooksFolder = 'git-tools/git-hooks'
    assert exists(customHooksFolder)
    target = relpath(abspath(customHooksFolder), split(gitHooksFolder)[0])
    createSymlinkIfNotExistsOrStale(target, gitHooksFolder)
Beispiel #3
0
def setupGitHooksIfNotSetup():
    # Check that the git hooks folder is all set up, and set it up if it isn't

    git_dir = subprocess.check_output(["git", "rev-parse", "--git-dir"]).decode("UTF-8").strip()
    gitHooksFolder = git_dir + "/hooks"

    customHooksFolder = "git-tools/git-hooks"
    assert exists(customHooksFolder)
    target = relpath(abspath(customHooksFolder), split(gitHooksFolder)[0])
    createSymlinkIfNotExistsOrStale(target, gitHooksFolder)
Beispiel #4
0
def setupGitHooksIfNotSetup():
    # Check that the git hooks folder is all set up, and set it up if it isn't

    git_dir = subprocess.check_output(["git", "rev-parse",
                                       "--git-dir"]).decode("UTF-8").strip()
    gitHooksFolder = git_dir + '/hooks'

    customHooksFolder = 'git-tools/git-hooks'
    assert exists(customHooksFolder)
    target = relpath(abspath(customHooksFolder), split(gitHooksFolder)[0])
    createSymlinkIfNotExistsOrStale(target, gitHooksFolder)