From bf817c6ea3036d8fd69995a767f5071e19232fb9 Mon Sep 17 00:00:00 2001 From: Thomas Backlund Date: Tue, 20 Oct 2015 00:38:50 +0300 Subject: lint fixes for git --- modules/git/files/apply_git_puppet_config.sh | 2 +- modules/git/files/create_git_repo.sh | 1 - modules/git/manifests/mirror.pp | 12 ++++++------ modules/git/manifests/snapshot.pp | 6 +++--- modules/git/manifests/svn_repository.pp | 12 ++++++------ 5 files changed, 16 insertions(+), 17 deletions(-) diff --git a/modules/git/files/apply_git_puppet_config.sh b/modules/git/files/apply_git_puppet_config.sh index 29ede998..1ed6fbf1 100644 --- a/modules/git/files/apply_git_puppet_config.sh +++ b/modules/git/files/apply_git_puppet_config.sh @@ -4,4 +4,4 @@ while read line do # --local is a option for the newer git git config --add $line -done < config.puppet +done < config.puppet diff --git a/modules/git/files/create_git_repo.sh b/modules/git/files/create_git_repo.sh index 1104edbe..28afde40 100644 --- a/modules/git/files/create_git_repo.sh +++ b/modules/git/files/create_git_repo.sh @@ -8,4 +8,3 @@ git --bare init --shared=group chmod g+ws branches info objects refs ( cd objects; chmod g+ws * ) git config receive.denyNonFastForwards true - diff --git a/modules/git/manifests/mirror.pp b/modules/git/manifests/mirror.pp index b3a9be9a..f7364846 100644 --- a/modules/git/manifests/mirror.pp +++ b/modules/git/manifests/mirror.pp @@ -3,18 +3,18 @@ define git::mirror( $source, $refresh = '*/5') { include git::common - exec { "/usr/bin/git clone --mirror $source $name": - alias => "git mirror $name", + exec { "/usr/bin/git clone --mirror ${source} ${name}": + alias => "git mirror ${name}", creates => $name, - before => File["$name/description"], + before => File["${name}/description"], } - file { "$name/description": + file { "${name}/description": content => $description, } - cron { "update $name": - command => "cd $name ; /usr/bin/git fetch -q", + cron { "update ${name}": + command => "cd ${name} ; /usr/bin/git fetch -q", minute => $refresh } } diff --git a/modules/git/manifests/snapshot.pp b/modules/git/manifests/snapshot.pp index 32e77d36..1156928e 100644 --- a/modules/git/manifests/snapshot.pp +++ b/modules/git/manifests/snapshot.pp @@ -9,14 +9,14 @@ define git::snapshot( $source, # Idealy, should be handled by vcsrepo # https://github.com/bruce/puppet-vcsrepo # once it is merged in puppet - exec { "/usr/bin/git clone -b $branch $source $name": + exec { "/usr/bin/git clone -b ${branch} ${source} ${name}": creates => $name, user => $user } if ($refresh != '0') { - cron { "update $name": - command => "cd $name && /usr/bin/git pull -q && /usr/bin/git submodule --quiet update --init --recursive", + cron { "update ${name}": + command => "cd ${name} && /usr/bin/git pull -q && /usr/bin/git submodule --quiet update --init --recursive", user => $user, minute => $refresh } diff --git a/modules/git/manifests/svn_repository.pp b/modules/git/manifests/svn_repository.pp index 93ddb792..ea215ce6 100644 --- a/modules/git/manifests/svn_repository.pp +++ b/modules/git/manifests/svn_repository.pp @@ -11,8 +11,8 @@ define git::svn_repository( $source, $options = '' } - exec { "/usr/bin/git svn init $options $source $name": - alias => "git svn $name", + exec { "/usr/bin/git svn init ${options} ${source} ${name}": + alias => "git svn ${name}", creates => $name, } @@ -21,15 +21,15 @@ define git::svn_repository( $source, source => 'puppet:///modules/git/update_git_svn.sh', } - cron { "update $name": + cron { "update ${name}": # done in 2 times, so fetch can fill the repo after init - command => "/usr/local/bin/update_git_svn.sh $name" , + command => "/usr/local/bin/update_git_svn.sh ${name}" , minute => $refresh } - file { "$name/.git/hooks/pre-receive": + file { "${name}/.git/hooks/pre-receive": mode => '0755', content => template('git/pre-receive'), - require => Exec["git svn $name"] + require => Exec["git svn ${name}"] } } -- cgit v1.2.1