Skip to content

Commit 0976571

Browse files
committed
Bump to 1.0.2, add license and author
1 parent dee6c11 commit 0976571

3 files changed

Lines changed: 28 additions & 6 deletions

File tree

LICENSE.txt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Copyright (c) 2019 Ryan Patterson
2+
3+
Permission to use, copy, modify, and/or distribute this software for
4+
any purpose with or without fee is hereby granted.
5+
6+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
11+
AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12+
OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

main.go

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,21 +160,26 @@ Now ~/dotfiles can be tracked in source control, and to install on another machi
160160
dfm init . --repos files
161161
dfm link
162162
163-
Note that .dfm.toml is a per-machine configuration and should not be tracked in source control.`, 80),
163+
Note that .dfm.toml is a per-machine configuration and should not be tracked in source control.
164+
165+
`, 80),
164166
}
165167
rootCmd.PersistentFlags().StringVarP(&dfmDir, "dfm-dir", "d", "", "directory where dfm repositories live")
166168
rootCmd.PersistentFlags().BoolVarP(&verbose, "verbose", "v", false, "output every file, even unchanged ones")
167169
rootCmd.PersistentFlags().BoolVarP(&dryRun, "dry-run", "n", false, "show what would happen, but don't actually modify files")
168170
rootCmd.PersistentFlags().BoolVarP(&force, "force", "f", false, "overwrite files that already exist")
169171

172+
rootCmd.SetUsageTemplate(rootCmd.UsageTemplate() + "\n" + CopyrightString + "\n")
173+
170174
initCmd := &cobra.Command{
171175
Use: "init",
172176
Short: "Initialize the dfm directory",
173177
Long: wordwrap.WrapString(`Initialize a directory to be used with dfm by creating the .dfm.toml file there.
174178
175179
Specifying --repos and --target will allow you to configure which repos are used and where the files should be stored. It is safe to run dfm init on an already-initialized dfm directory, to change the repos that are being used.`, 80),
176-
Args: cobra.NoArgs,
177-
Run: runInit,
180+
Example: ` dfm init --repos files ~/dotfiles`,
181+
Args: cobra.NoArgs,
182+
Run: runInit,
178183
}
179184
initCmd.Flags().StringArrayVar(&cliOptions.Repos, "repos", nil, "repositories to track")
180185
initCmd.Flags().StringVar(&cliOptions.Target, "target", "", "directory to sync files in")
@@ -195,8 +200,9 @@ Specifying --repos and --target will allow you to configure which repos are used
195200
})
196201

197202
addCmd := &cobra.Command{
198-
Use: "add",
199-
Short: "Begin tracking files",
203+
Use: "add [files]",
204+
Aliases: []string{"import"},
205+
Short: "Begin tracking files",
200206
Long: wordwrap.WrapString(`Copy the given files into the repository and replace the originals with links to the tracked files.
201207
202208
If no repo is specified in the command, the repo that is listed last will be used.`, 80),

version.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
package main
22

33
// Version is the version of the running dfm.
4-
const Version = "1.0.0"
4+
const Version = "1.0.2"
5+
6+
// CopyrightString is used to show the license and author in help messages.
7+
const CopyrightString = `dfm, by Ryan Patterson, 2019
8+
Distributed under the zero-clause BSD license.`

0 commit comments

Comments
 (0)