修改版本号生成逻辑
This commit is contained in:
parent
a099a5339b
commit
c8c5e2e4d7
11
pmpt/util.py
11
pmpt/util.py
|
@ -17,9 +17,10 @@ console = Console()
|
||||||
|
|
||||||
|
|
||||||
def getVer(baseVar):
|
def getVer(baseVar):
|
||||||
baseVar = (
|
if os.environ.get('GITHUB_ACTIONS', None):
|
||||||
baseVar # + '.' + os.environ.get('GITHUB_RUN_ID', str(int(time.time()))[:6])
|
baseVar = (
|
||||||
)
|
baseVar + '.' + os.environ.get('GITHUB_RUN_NUMBER')
|
||||||
|
)
|
||||||
logger.info("PMPT " + baseVar)
|
logger.info("PMPT " + baseVar)
|
||||||
return baseVar
|
return baseVar
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ logger.add(
|
||||||
level="TRACE",
|
level="TRACE",
|
||||||
)
|
)
|
||||||
|
|
||||||
__version__ = getVer("1.0.3")
|
__version__ = getVer("1.0.5")
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
||||||
|
@ -43,7 +44,7 @@ def init():
|
||||||
open(os.path.join(dirs.user_config_dir, "Source.json"), "w").write("[]")
|
open(os.path.join(dirs.user_config_dir, "Source.json"), "w").write("[]")
|
||||||
from . import source
|
from . import source
|
||||||
|
|
||||||
source.add("https://pypi.org/simple", 1)
|
source.add('https://pypi.org/simple',1)
|
||||||
|
|
||||||
if not os.path.exists(os.path.join(dirs.user_config_dir, "api.url")):
|
if not os.path.exists(os.path.join(dirs.user_config_dir, "api.url")):
|
||||||
open(os.path.join(dirs.user_config_dir, "api.url"), "w").write(
|
open(os.path.join(dirs.user_config_dir, "api.url"), "w").write(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user