Skip to content

Commit 6a04f9a

Browse files
committed
Fixed formatting of package.py
1 parent 8ff6f4b commit 6a04f9a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

package.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
import re
44
from git import Repo, TagReference
55

6+
67
def readVersionFromPackageJson() -> None:
78
packageJson = open("package.json", "r")
89
contentRaw = packageJson.read()
910
contentJson = json.loads(contentRaw)
1011
packageJson.close()
1112
return contentJson["version"]
1213

14+
1315
def isPackageJsonVersionTagged(repo, packageJsonVersion) -> bool:
1416
packageJsonVersionTagFound = False
1517
for tag in repo.tags:
@@ -18,6 +20,7 @@ def isPackageJsonVersionTagged(repo, packageJsonVersion) -> bool:
1820
break
1921
return packageJsonVersionTagFound
2022

23+
2124
def isChangeLogUpdatedWithPackageJsonVersion(packageJsonVersion) -> bool:
2225
packageJsonVersionChangeLogEntryFound = False
2326
changeLog = open("CHANGELOG.md", "r")
@@ -30,22 +33,25 @@ def isChangeLogUpdatedWithPackageJsonVersion(packageJsonVersion) -> bool:
3033
break
3134
return packageJsonVersionChangeLogEntryFound
3235

36+
3337
def isAllPackagesInstalledLocally() -> bool:
3438
process = subprocess.Popen(["cmd", "/c", "npm", "list", "--production", "--parseable", "--depth=99999", "--loglevel=error"], stderr=subprocess.PIPE)
3539
out = process.stderr.read()
3640
success = (len(out) == 0)
3741
if (not success):
38-
print(f"Error while checking if all packages is installed locally: {out}")
42+
print(f"Error while checking if all packages is installed locally: {out}")
3943
return success
4044

45+
4146
def packageExtension() -> bool:
4247
process = subprocess.Popen(["cmd", "/c", "vsce", "package"], stderr=subprocess.PIPE)
4348
out = process.stderr.read()
4449
success = (len(out) == 0)
4550
if (not success):
46-
print(f"Error while packaging: {out}")
51+
print(f"Error while packaging: {out}")
4752
return success
4853

54+
4955
def main():
5056
packageJsonVersion = readVersionFromPackageJson()
5157
repo = Repo("./")
@@ -72,4 +78,5 @@ def main():
7278
print("Creating tag in Git...")
7379
repo.create_tag(packageJsonVersion)
7480

81+
7582
main()

0 commit comments

Comments
 (0)