Add version cmd
				
					
				
			This commit is contained in:
		
							parent
							
								
									3fa5dbfab0
								
							
						
					
					
						commit
						8d0031e2ee
					
				
					 2 changed files with 12 additions and 1 deletions
				
			
		| 
						 | 
					@ -9,6 +9,8 @@ import osdk.targets as targets
 | 
				
			||||||
import osdk.manifests as manifests
 | 
					import osdk.manifests as manifests
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					__version__="0.2.1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CMDS = {}
 | 
					CMDS = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -126,6 +128,10 @@ def helpCmd(opts: dict, args: list[str]) -> None:
 | 
				
			||||||
    print("")
 | 
					    print("")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def versionCmd(opts: dict, args: list[str]) -> None:
 | 
				
			||||||
 | 
					    print("OSDK v" + __version__)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
CMDS = {
 | 
					CMDS = {
 | 
				
			||||||
    "run": {
 | 
					    "run": {
 | 
				
			||||||
        "func": runCmd,
 | 
					        "func": runCmd,
 | 
				
			||||||
| 
						 | 
					@ -151,6 +157,10 @@ CMDS = {
 | 
				
			||||||
        "func": helpCmd,
 | 
					        "func": helpCmd,
 | 
				
			||||||
        "desc": "Show this help message",
 | 
					        "desc": "Show this help message",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    "version": {
 | 
				
			||||||
 | 
					        "func": versionCmd,
 | 
				
			||||||
 | 
					        "desc": "Show current version",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										3
									
								
								setup.py
									
										
									
									
									
								
							
							
						
						
									
										3
									
								
								setup.py
									
										
									
									
									
								
							| 
						 | 
					@ -1,8 +1,9 @@
 | 
				
			||||||
from setuptools import setup
 | 
					from setuptools import setup
 | 
				
			||||||
 | 
					from osdk import __version__
 | 
				
			||||||
 | 
					
 | 
				
			||||||
setup(
 | 
					setup(
 | 
				
			||||||
    name="osdk",
 | 
					    name="osdk",
 | 
				
			||||||
    version="0.2.0",
 | 
					    version=__version__,
 | 
				
			||||||
    python_requires='>=3.10',
 | 
					    python_requires='>=3.10',
 | 
				
			||||||
    description="Operating System Development Kit",
 | 
					    description="Operating System Development Kit",
 | 
				
			||||||
    author="The DEVSE Community",
 | 
					    author="The DEVSE Community",
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue