Skip to content

Commit

Permalink
Initial Expeditor setup
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Duffield <tom@chef.io>
  • Loading branch information
tduffield committed Feb 9, 2018
1 parent ff643eb commit c8c6859
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 19 deletions.
35 changes: 35 additions & 0 deletions .expeditor/config.yml
@@ -0,0 +1,35 @@
---
slack:
notify_channel: chef-notify

github:
version_tag_format: "v{{version}}"
minor_bump_labels:
- "Version: Bump Minor"

changelog:
rollup_header: Changes not yet released to rubygems.org

rubygems:
- mixlib-config

merge_actions:
- built_in:bump_version:
ignore_labels:
- "Version: Skip Bump"
- "Expeditor: Skip All"
- bash:.expeditor/update_version.sh:
only_if:
- built_in:bump_version
- built_in:update_changelog:
ignore_labels:
- "Changelog: Skip Update"
- "Expeditor: Skip All"
- built_in:build_gem:
only_if:
- built_in:bump_version

promote:
action:
- built_in:publish_rubygems
- built_in:rollover_changelog
12 changes: 12 additions & 0 deletions .expeditor/update_version.sh
@@ -0,0 +1,12 @@
#!/bin/sh
#
# After a PR merge, Chef Expeditor will bump the PATCH version in the VERSION file.
# It then executes this file to update any other files/components with that new version.
#

set -evx

sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/mixlib/config/version.rb

# Once Expeditor finshes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.
12 changes: 9 additions & 3 deletions CHANGELOG.md
@@ -1,12 +1,21 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
# Change Log

<!-- latest_release -->
<!-- latest_release -->

<!-- release_rollup -->
<!-- release_rollup -->

<!-- latest_stable_release -->
## [2.2.4](https://github.com/chef/mixlib-config/tree/2.2.4) (2016-09-02)
[Full Changelog](https://github.com/chef/mixlib-config/compare/v2.2.3...2.2.4)

**Merged pull requests:**

- Allow a config context to be set from another config context [\#42](https://github.com/chef/mixlib-config/pull/42) ([mwrock](https://github.com/mwrock))
- Allow configuring contexts via block [\#35](https://github.com/chef/mixlib-config/pull/35) ([KierranM](https://github.com/KierranM))
<!-- latest_stable_release -->

## [2.2.3](https://github.com/chef/mixlib-config/tree/2.2.3) (2016-08-30)
[Full Changelog](https://github.com/chef/mixlib-config/compare/v2.2.2...2.2.3)
Expand Down Expand Up @@ -144,6 +153,3 @@
[Full Changelog](https://github.com/chef/mixlib-config/compare/v1.0.5...v1.0.6)

## [v1.0.5](https://github.com/chef/mixlib-config/tree/v1.0.5) (2009-05-12)


\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
2 changes: 0 additions & 2 deletions Gemfile
@@ -1,5 +1,3 @@
source "https://rubygems.org"

gemspec

gem "github_changelog_generator", group: :changelog
16 changes: 16 additions & 0 deletions README.md
Expand Up @@ -43,6 +43,22 @@ And you can modify configuration values with this syntax:
MyConfig[:first_value] = 'foobar' # sets first_value to 'foobar'
```

If you prefer to allow your users to pass in configuration via YAML files, `mixlib-config` supports that too!

```ruby
MyConfig.from_file('~/.myconfig.yml')
```

This way, a user could write a YAML config file that looked like this:

```yaml
---
first_value: 'hi'
second_value: 'goodbye'
```

Please note: There is an inherent limitation in the logic you can do with YAML file. At this time, `mixlib-config` does not support ERB or other logic in YAML config (read "static content only").

## Nested Configuration

Often you want to be able to group configuration options to provide a common context. Mixlib::Config supports this thus:
Expand Down
14 changes: 0 additions & 14 deletions Rakefile
Expand Up @@ -32,17 +32,3 @@ RDoc::Task.new do |rdoc|
rdoc.rdoc_files.include("README*")
rdoc.rdoc_files.include("lib/**/*.rb")
end

begin
require "github_changelog_generator/task"

GitHubChangelogGenerator::RakeTask.new :changelog do |config|
config.issues = false
config.future_release = Mixlib::Config::VERSION
config.enhancement_labels = "enhancement,Enhancement,New Feature,Feature".split(",")
config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",")
config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Discussion".split(",")
end
rescue LoadError
puts "github_changelog_generator is not available. gem install github_changelog_generator to generate changelogs"
end
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
2.2.4

0 comments on commit c8c6859

Please sign in to comment.