parent
b2e4a7957a
commit
b2f143597c
4 changed files with 2 additions and 27 deletions
|
@ -62,7 +62,6 @@ docs lint:
|
|||
before_script: []
|
||||
script:
|
||||
- scripts/lint-doc.sh
|
||||
- scripts/lint-changelog-yaml
|
||||
- mv doc/ /tmp/gitlab-docs/content/$DOCS_GITLAB_REPO_SUFFIX
|
||||
- cd /tmp/gitlab-docs
|
||||
# Lint Markdown
|
||||
|
|
|
@ -6,4 +6,4 @@ lint-ci-gitlab:
|
|||
dependencies: []
|
||||
image: sdesbure/yamllint:latest
|
||||
script:
|
||||
- yamllint .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates
|
||||
- yamllint .gitlab-ci.yml .gitlab/ci lib/gitlab/ci/templates changelogs
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
To generate and validate your changelog entries:
|
||||
|
||||
1. Run `bin/changelog` to generate.
|
||||
1. Run `scripts/lint-changelog-yaml` to validate.
|
||||
1. Run `yamllint changelogs` to validate.
|
||||
|
||||
See [development/changelog] documentation for detailed usage.
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
require 'yaml'
|
||||
|
||||
invalid_changelogs = Dir['changelogs/**/*'].reject do |changelog|
|
||||
next true if changelog =~ /((README|archive)\.md|unreleased(-ee)?)$/
|
||||
next false unless changelog.end_with?('.yml')
|
||||
|
||||
begin
|
||||
YAML.load_file(changelog)
|
||||
rescue => exception
|
||||
puts exception
|
||||
end
|
||||
end
|
||||
|
||||
if invalid_changelogs.any?
|
||||
puts
|
||||
puts "Invalid changelogs found!\n"
|
||||
puts invalid_changelogs.sort
|
||||
exit 1
|
||||
else
|
||||
puts "All changelogs are valid YAML.\n"
|
||||
exit 0
|
||||
end
|
Loading…
Reference in a new issue