mirror of
https://github.com/thegeeklab/drone-yaml.git
synced 2024-11-22 01:50:40 +00:00
retain ordering when converting merge keys
This commit is contained in:
parent
8ea6eb1cc3
commit
596b719f96
@ -9,6 +9,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
|
||||
## [1.1.1] - 2019-05-30
|
||||
### Fixed
|
||||
- Retain order of steps when converting legacy pipelines with merge keys, by [@bradrydzewski](https://github.com/bradrydzewski).
|
||||
|
||||
|
||||
## [1.1.0] - 2019-05-30
|
||||
### Fixed
|
||||
- Support for yaml merge keys, by [@bradrydzewski](https://github.com/bradrydzewski).
|
||||
|
@ -10,9 +10,14 @@ import (
|
||||
"github.com/vinzenz/yaml"
|
||||
)
|
||||
|
||||
type temporary struct {
|
||||
Attributes map[string]interface{} `yaml:",inline"`
|
||||
Pipeline yaml.MapSlice `yaml:"pipeline"`
|
||||
}
|
||||
|
||||
// this is a helper function that expands merge keys
|
||||
func expandMergeKeys(b []byte) ([]byte, error) {
|
||||
v := map[interface{}]interface{}{}
|
||||
v := new(temporary)
|
||||
if err := yaml.Unmarshal(b, v); err != nil {
|
||||
return b, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user