Skip to content

Commit f57fcba

Browse files
authored
Merge pull request #471 from puppetlabs/maint/main/puppet_lint
(maint) - Set puppet lint to ignore example
2 parents c568185 + 6af8ad0 commit f57fcba

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed

.github/workflows/auto_release.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@ jobs:
4646
run: |
4747
echo "::set-output name=ver::$(jq --raw-output .version metadata.json)"
4848
49-
- name: "Commit changes"
49+
- name: "Check if a release is necessary"
5050
if: ${{ github.repository_owner == 'puppetlabs' }}
51+
id: check
52+
run: |
53+
git diff --quiet CHANGELOG.md && echo "::set-output name=release::false" || echo "::set-output name=release::true"
54+
55+
- name: "Commit changes"
56+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
5157
run: |
5258
git config --local user.email "${{ github.repository_owner }}@users.noreply.github.com"
5359
git config --local user.name "GitHub Action"
@@ -57,7 +63,7 @@ jobs:
5763
- name: Create Pull Request
5864
id: cpr
5965
uses: puppetlabs/peter-evans-create-pull-request@v3
60-
if: ${{ github.repository_owner == 'puppetlabs' }}
66+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
6167
with:
6268
token: ${{ secrets.GITHUB_TOKEN }}
6369
commit-message: "Release prep v${{ steps.gv.outputs.ver }}"
@@ -73,7 +79,7 @@ jobs:
7379
labels: "maintenance"
7480

7581
- name: PR outputs
76-
if: ${{ github.repository_owner == 'puppetlabs' }}
82+
if: ${{ github.repository_owner == 'puppetlabs' && steps.check.outputs.release == 'true' }}
7783
run: |
7884
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
7985
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"

.puppet-lint.rc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
--relative
2+
--ignore-paths=examples/*.pp,vendor/**/*.pp,bundle/**/*.pp,pkg/**/*.pp,spec/**/*.pp

.sync.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
.travis.yml:
2525
delete: true
2626
changelog_since_tag: 'v5.0.0'
27+
Rakefile:
28+
linter_exclusions:
29+
- examples/*.pp
30+
- vendor/**/*.pp
31+
- bundle/**/*.pp
32+
- pkg/**/*.pp
33+
- spec/**/*.pp
2734
Gemfile:
2835
optional:
2936
":development":

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ def changelog_future_release
4242
end
4343

4444
PuppetLint.configuration.send('disable_relative')
45-
PuppetLint.configuration.send('disable_autoloader_layout')
45+
PuppetLint.configuration.ignore_paths = ["examples/*.pp", "vendor/**/*.pp", "bundle/**/*.pp", "pkg/**/*.pp", "spec/**/*.pp"]
46+
4647

4748
if Bundler.rubygems.find_name('github_changelog_generator').any?
4849
GitHubChangelogGenerator::RakeTask.new :changelog do |config|

metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@
8585
}
8686
],
8787
"template-url": "https://github.com/puppetlabs/pdk-templates.git#main",
88-
"template-ref": "tags/2.2.0-0-g2381db6",
89-
"pdk-version": "2.1.0"
88+
"template-ref": "heads/main-0-gb4d80a6",
89+
"pdk-version": "2.2.0"
9090
}

pdk.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
ignore: []

0 commit comments

Comments
 (0)