Add versioning to imgtool
Signed-off-by: Fabio Utzig <utzig@apache.org>
This commit is contained in:
parent
99ec383ea1
commit
25c6a1590a
|
@ -11,3 +11,5 @@
|
|||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
imgtool_version = "1.4.0a3"
|
||||
|
|
|
@ -20,7 +20,7 @@ import click
|
|||
import getpass
|
||||
import imgtool.keys as keys
|
||||
import sys
|
||||
from imgtool import image
|
||||
from imgtool import image, imgtool_version
|
||||
from imgtool.version import decode_version
|
||||
|
||||
|
||||
|
@ -249,6 +249,11 @@ class AliasesGroup(click.Group):
|
|||
return None
|
||||
|
||||
|
||||
@click.command(help='Print imgtool version information')
|
||||
def version():
|
||||
print(imgtool_version)
|
||||
|
||||
|
||||
@click.command(cls=AliasesGroup,
|
||||
context_settings=dict(help_option_names=['-h', '--help']))
|
||||
def imgtool():
|
||||
|
@ -259,6 +264,7 @@ imgtool.add_command(keygen)
|
|||
imgtool.add_command(getpub)
|
||||
imgtool.add_command(verify)
|
||||
imgtool.add_command(sign)
|
||||
imgtool.add_command(version)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import setuptools
|
||||
from imgtool import imgtool_version
|
||||
|
||||
setuptools.setup(
|
||||
name="imgtool",
|
||||
version="1.3.1",
|
||||
version=imgtool_version,
|
||||
author="The MCUboot commiters",
|
||||
description=("MCUboot's image signing and key management"),
|
||||
license="Apache Software License",
|
||||
|
|
Loading…
Reference in New Issue