-
Notifications
You must be signed in to change notification settings - Fork 1.2k
docs: refine command usage statements #1331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
The codes are self-documenting enough.
03dd901
to
cf49b11
Compare
cf49b11
to
636d410
Compare
cmd/command.go
Outdated
@@ -68,7 +68,7 @@ func init() { | |||
|
|||
buildCmd.Flags().StringVarP(&buildDir, "build-dir", "b", "", "dir for build process") | |||
|
|||
upgradeCmd.Flags().StringVarP(&upgradeVersion, "from", "f", "", "upgrade from specific version, eg: -f v1.1.0") | |||
upgradeCmd.Flags().StringVarP(&upgradeVersion, "from", "f", "", "upgrade to the specific version from your input, eg: -f v1.1.0") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a slight misunderstanding in the description of the upgrade command here. For example, if the command is answer upgrade -f v1.3.5
, it means that answer will be upgraded from v1.3.5 to the latest version(The current version of the binary). So it's not you describing an upgrade to a specified version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh...Okay, actually I especially checked how the upgradeVersion
var was used. It turns out that I misunderstood this comment line and the function signature... 😂 I'll recover its description.
Line 48 in 3f1ed50
// If you want to upgrade the database to version 1.1.0, you can use `answer upgrade -f v1.1.0`. answer/internal/migrations/migrations.go
Line 137 in 636d410
func Migrate(debug bool, dbConf *data.Database, cacheConf *data.CacheConf, upgradeToSpecificVersion string) error {
636d410
to
405f794
Compare
405f794
to
75c5c89
Compare
See #1330 for backgroud details.