func (s *SetCustomBuildProperties) Run(ctx *types.Context) error { logger := ctx.GetLogger() buildProperties := ctx.BuildProperties customBuildProperties, err := props.LoadFromSlice(ctx.CustomBuildProperties, logger) if err != nil { return i18n.WrapError(err) } for key, value := range customBuildProperties { buildProperties[key] = value } return nil }
func (s *SetCustomBuildProperties) Run(context map[string]interface{}) error { if !utils.MapHas(context, constants.CTX_CUSTOM_BUILD_PROPERTIES) { return nil } buildProperties := context[constants.CTX_BUILD_PROPERTIES].(map[string]string) customBuildProperties := props.LoadFromSlice(context[constants.CTX_CUSTOM_BUILD_PROPERTIES].([]string)) for key, value := range customBuildProperties { buildProperties[key] = value } return nil }
func (s *SetCustomBuildProperties) Run(context map[string]interface{}) error { if !utils.MapHas(context, constants.CTX_CUSTOM_BUILD_PROPERTIES) { return nil } logger := context[constants.CTX_LOGGER].(i18n.Logger) buildProperties := context[constants.CTX_BUILD_PROPERTIES].(props.PropertiesMap) customBuildProperties, err := props.LoadFromSlice(context[constants.CTX_CUSTOM_BUILD_PROPERTIES].([]string), logger) if err != nil { return utils.WrapError(err) } for key, value := range customBuildProperties { buildProperties[key] = value } return nil }