Skip to content

Commit ef33760

Browse files
SAPTeamDEVSAPTeamDEV
authored andcommitted
Add ModuleVersion and ModuleVersionCode properties
1 parent c964800 commit ef33760

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

module.prop

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
id=@(ModuleName)
22
name=@(ModuleDisplayName)
3-
version=v1.2
4-
versionCode=12
3+
version=@(ModuleVersion)
4+
versionCode=@(ModuleVersionCode)
55
author=@(ModuleAuthorName)
66
description=@(ModuleDescription)
7-
updateJson=https://raw.githubusercontent.com/SAPTeamDEV/@(ModuleName)/master/update.json
7+
updateJson=https://raw.githubusercontent.com/@(ModuleAuthorName)/@(ModuleName)/master/update.json

setup.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
# Change this values according to your Project.
66
ModuleName = os.path.split(os.path.split(__file__)[0])[1]
77
ModuleDisplayName = ModuleName.replace('-', ' ')
8+
ModuleVersion = "1.0"
9+
ModuleVersionCode = ModuleVersion.replace('.', '')
810
ModuleDescription = ""
911
ModuleAuthorName = ""
1012

@@ -35,14 +37,25 @@ def makeTree(source = '.'):
3537
if '@(ModuleName)' in fData:
3638
fData = fData.replace('@(ModuleName)', ModuleName)
3739
hasModified = True
40+
3841
# Replace module display name
3942
if '@(ModuleDisplayName)' in fData:
4043
fData = fData.replace('@(ModuleDisplayName)', ModuleDisplayName)
4144
hasModified = True
45+
4246
#Replace module description
4347
if '@(ModuleDescription)' in fData:
4448
fData = fData.replace('@(ModuleDescription)', ModuleDescription)
4549
hasModified = True
50+
51+
# Replace module version data
52+
if '@(ModuleVersion)' in fData:
53+
fData = fData.replace('@(ModuleVersion)', ModuleVersion)
54+
hasModified = True
55+
if '@(ModuleVersionCode)' in fData:
56+
fData = fData.replace('@(ModuleVersionCode)', ModuleVersionCode)
57+
hasModified = True
58+
4659
# Replace module author name
4760
if '@(ModuleAuthorName)' in fData:
4861
fData = fData.replace('@(ModuleAuthorName)', ModuleAuthorName)

update.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"version": "1.2",
3-
"versionCode": 12,
4-
"zipUrl": "https://github.com/SAPTeamDEV/@(ModuleName)/releases/latest/download/@(ModuleName).zip",
5-
"changelog": "https://raw.githubusercontent.com/SAPTeamDEV/@(ModuleName)/master/changelog.md"
2+
"version": "@(ModuleVersion)",
3+
"versionCode": @(ModuleVersionCode),
4+
"zipUrl": "https://github.com/@(ModuleAuthorName)/@(ModuleName)/releases/latest/download/@(ModuleName).zip",
5+
"changelog": "https://raw.githubusercontent.com/@(ModuleAuthorName)/@(ModuleName)/master/changelog.md"
66
}

0 commit comments

Comments
 (0)