Remove --version flag, fix #61

This commit is contained in:
Antonin Décimo
2019-02-09 17:39:49 +01:00
parent 49bad4aa01
commit 4f26c0844b
2 changed files with 2 additions and 13 deletions

View File

@@ -61,7 +61,6 @@ Options:
-x <exclude_pattern>, --exclude <exclude_pattern>
Exclude file patterns.
-v <v> Project version.
--version Show love-release version and exit.
-h, --help Show this help message and exit.
For more info, see https://github.com/MisterDA/love-release
@@ -143,10 +142,10 @@ rm -rf '/usr/share/bash-completion/completions/love-release' '/etc/bash_completi
## Contribute
The documentation of love-release internals is written with [LDoc][ldoc].
Generate it by running `ldoc .`.
Generate it by running `ldoc .`.\
I currently do not plan to continue the development of the Bash script,
or even to fix it. If there appears to be any need for it, let me know
and I might consider doing so.
and I might consider doing so.\
Every bug report or feature request is gladly welcome !
[forum_topic]: https://love2d.org/forums/viewtopic.php?t=75387

View File

@@ -53,26 +53,16 @@ function Args:initialize()
parser:option("-x --exclude", "Exclude file patterns."):count("*")
:target("excludeFileList")
parser:flag("--version", "Show love-release version and exit.")
:target("love_release")
self.args = parser:parse()
end
function Args:__call(project)
local out = utils.io.out
local args = self.args
if self.pre then
if args.source then project:setProjectDirectory(args.source) end
if args.release then project:setReleaseDirectory(args.release) end
if args.love_release then
local show = require 'luarocks.show'
local _, version = show.pick_installed_rock("love-release")
out("love-release "..version.."\n")
os.exit(0)
end
self.pre = false
return project
end