Skip to content

Commit

Permalink
all: Miscellaneous tweaks and edits
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring authored Dec 13, 2024
1 parent afcd4e6 commit 74b55cc
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 14 deletions.
7 changes: 1 addition & 6 deletions assets/hvm.tape
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@ Ctrl+L
Show

# Commands
Type "hvm use"
Sleep 1
Enter
Sleep 3

Type "1"
Type "hvm use latest"
Sleep 1
Enter
Wait+Line@10s /\$/
Expand Down
Binary file modified assets/hvm.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ var rootCmd = &cobra.Command{
Short: "Hugo Version Manager",
Long: `Hugo Version Manager (` + App.Name + `) is a tool that helps you download, manage, and switch
between different versions of the Hugo static site generator. You can also use
hvm to install Hugo as a standalone application.`,
` + App.Name + ` to install Hugo as a standalone application.`,
Version: versionString,
}

Expand Down
6 changes: 4 additions & 2 deletions cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

// installCmd represents the install command
var installCmd = &cobra.Command{
Use: "install [flags] [version]",
Use: "install [version] | [flags]",
Short: "Install a default version to use when version management is disabled",
Long: `Displays a list of recent Hugo releases, prompting you to select a version
to use when version management is disabled in the current directory. It then
Expand All @@ -39,7 +39,9 @@ To use this version when version management is disabled in the current
directory, the cache "default" directory must be in your PATH. If it is not,
you will be prompted to add it when installation is complete.
To bypass the selection screen provide a version argument to the command.`,
Bypass the selection menu by specifying a version, or specify "latest" to use
the latest release.
`,
Run: func(cmd *cobra.Command, args []string) {
version := ""
if len(args) > 0 {
Expand Down
File renamed without changes.
10 changes: 6 additions & 4 deletions cmd/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ import (

// useCmd represents the use command
var useCmd = &cobra.Command{
Use: "use [flags] [version]",
Use: "use [version] | [flags]",
Aliases: []string{"get"},
Short: "Select a version to use in the current directory",
Long: `Displays a list of recent Hugo releases, prompting you to select a version
to use in the current directory. It then downloads, extracts, and caches the
release asset for your operating system and architecture and writes the version
tag to an .hvm file.
tag to an ` + App.DotFileName + ` file.
To bypass the selection screen provide a version argument to the command.`,
Bypass the selection menu by specifying a version, or specify "latest" to use
the latest release.
`,
Run: func(cmd *cobra.Command, args []string) {
version := ""

Expand All @@ -59,7 +61,7 @@ To bypass the selection screen provide a version argument to the command.`,
version, err = getVersionFromDotFile()
cobra.CheckErr(err)
if version == "" {
cobra.CheckErr(fmt.Errorf("the current directory does not contain an .hvm file"))
cobra.CheckErr(fmt.Errorf("the current directory does not contain an %s file", App.DotFileName))
}
} else if len(args) > 0 {
version = args[0]
Expand Down
2 changes: 1 addition & 1 deletion cmd/use_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright © 2023 Joe Mooring <[email protected]>
Copyright © 2024 Joe Mooring <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 74b55cc

Please sign in to comment.