From 3bc091f826704d0a95d4d500d60083bddd3dee74 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 27 Apr 2022 00:55:31 +0200 Subject: [PATCH] lean flag --- CHANGELOG.md | 6 ++++++ cmd/cron.go | 3 +-- internal/config.go | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbac014..d8ead68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.7.1] - 2022-04-27 + +### Fixed + +- #178 Lean flag not working properly. + ## [1.7.0] - 2022-04-27 ### Changed diff --git a/cmd/cron.go b/cmd/cron.go index 269a70b..175ae13 100644 --- a/cmd/cron.go +++ b/cmd/cron.go @@ -13,7 +13,6 @@ var cronCmd = &cobra.Command{ Long: `Intended to be mainly triggered by an automated system like systemd or crontab. For each location checks if a cron backup is due and runs it.`, Run: func(cmd *cobra.Command, args []string) { internal.GetConfig() - flags.CRON_LEAN, _ = cmd.Flags().GetBool("lean") err := lock.Lock() CheckErr(err) defer lock.Unlock() @@ -25,5 +24,5 @@ var cronCmd = &cobra.Command{ func init() { rootCmd.AddCommand(cronCmd) - cronCmd.Flags().Bool("lean", false, "only output information about actual backups") + cronCmd.Flags().BoolVar(&flags.CRON_LEAN, "lean", false, "only output information about actual backups") } diff --git a/internal/config.go b/internal/config.go index 0c0b38d..691b4f7 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.7.0" +const VERSION = "1.7.1" type OptionMap map[string][]interface{} type Options map[string]OptionMap