mirror of
https://github.com/lukaszraczylo/semver-generator.git
synced 2026-06-10 23:28:58 +00:00
fixup! Update documentation.
This commit is contained in:
+6
-6
@@ -34,18 +34,18 @@ type Config struct {
|
||||
// ReadConfig reads the configuration from a file
|
||||
func ReadConfig(file string) (*Config, error) {
|
||||
config := &Config{}
|
||||
|
||||
|
||||
viper.SetConfigFile(file)
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
err = fmt.Errorf("fatal error config file: %s", err)
|
||||
return config, err
|
||||
}
|
||||
|
||||
|
||||
viper.UnmarshalKey("wording", &config.Wording)
|
||||
viper.UnmarshalKey("force", &config.Force)
|
||||
viper.UnmarshalKey("blacklist", &config.Blacklist)
|
||||
|
||||
|
||||
return config, nil
|
||||
}
|
||||
|
||||
@@ -55,14 +55,14 @@ func ApplyForcedVersioning(force Force, semver *SemVer) {
|
||||
Debug("Forced versioning (MAJOR)", map[string]interface{}{"major": force.Major})
|
||||
semver.Major = force.Major
|
||||
}
|
||||
|
||||
|
||||
if force.Minor > 0 {
|
||||
Debug("Forced versioning (MINOR)", map[string]interface{}{"minor": force.Minor})
|
||||
semver.Minor = force.Minor
|
||||
}
|
||||
|
||||
|
||||
if force.Patch > 0 {
|
||||
Debug("Forced versioning (PATCH)", map[string]interface{}{"patch": force.Patch})
|
||||
semver.Patch = force.Patch
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user