Renamed actionUpdate to actionRefresh

This commit is contained in:
Yuriy Glukhov 2016-04-13 15:20:28 +03:00
commit 4c3f62adf3
2 changed files with 8 additions and 8 deletions

View file

@ -55,7 +55,7 @@ proc update(options: Options) =
##
## If the download is not successful, an exception is raised.
let parameter =
if options.action.typ == actionUpdate:
if options.action.typ == actionRefresh:
options.action.optionalURL
else:
""
@ -895,7 +895,7 @@ proc doAction(options: Options) =
echo("Pre-hook prevented further execution.")
return
case options.action.typ
of actionUpdate:
of actionRefresh:
update(options)
of actionInstall:
let (_, pkgInfo) = install(options.action.packages, options)

View file

@ -18,7 +18,7 @@ type
pkgInfoCache*: TableRef[string, PackageInfo]
ActionType* = enum
actionNil, actionUpdate, actionInit, actionDump, actionPublish,
actionNil, actionRefresh, actionInit, actionDump, actionPublish,
actionInstall, actionSearch,
actionList, actionBuild, actionPath, actionUninstall, actionCompile,
actionCustom, actionTasks, actionVersion
@ -27,7 +27,7 @@ type
case typ*: ActionType
of actionNil, actionList, actionBuild, actionPublish, actionTasks,
actionVersion: nil
of actionUpdate:
of actionRefresh:
optionalURL*: string # Overrides default package list.
of actionInstall, actionPath, actionUninstall:
packages*: seq[PkgTuple] # Optional only for actionInstall.
@ -111,7 +111,7 @@ proc parseActionType*(action: string): ActionType =
of "dump":
result = actionDump
of "update", "refresh":
result = actionUpdate
result = actionRefresh
of "search":
result = actionSearch
of "list":
@ -141,7 +141,7 @@ proc initAction*(options: var Options, key: string) =
options.action.projName = ""
of actionDump:
options.action.projName = ""
of actionUpdate:
of actionRefresh:
options.action.optionalURL = ""
of actionSearch:
options.action.search = @[]
@ -215,7 +215,7 @@ proc parseArgument*(key: string, result: var Options) =
result.action.packages.add(pkgTup)
else:
result.action.packages.add((key, VersionRange(kind: verAny)))
of actionUpdate:
of actionRefresh:
result.action.optionalURL = key
of actionSearch:
result.action.search.add(key)
@ -320,4 +320,4 @@ proc getProxy*(options: Options): Proxy =
else: ""
return newProxy($parsed, auth)
else:
return nil
return nil