Skip to content

Commit

Permalink
Updated build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Kapiainen committed Dec 10, 2016
1 parent fc701b2 commit 1883c84
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions BuildPackages.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@python BuildPackages.py
@pause
1 change: 1 addition & 0 deletions BuildPackages.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
PACKAGE_EXTENSION = ".sublime-package"

def main():
print("Building .sublime-package files...")
global ROOT
licenseFile = os.path.join(ROOT, "LICENSE.md")
if not os.path.isfile(licenseFile):
Expand Down
2 changes: 2 additions & 0 deletions BuildReleases.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@python BuildReleases.py
@pause
5 changes: 4 additions & 1 deletion BuildReleases.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
PACKAGE_EXTENSION = ".sublime-package"

def main():
print("Input version number: ")
releaseVersion = input()
print("Building a release archive...")
global ROOT
licenseFile = os.path.join(ROOT, "LICENSE.md")
if not os.path.isfile(licenseFile):
Expand All @@ -31,7 +34,7 @@ def main():
print("Could not find 'Packages' folder in '%s'." % ROOT)
return
packages = [os.path.join(pkg, p) for p in os.listdir(pkg) if PACKAGE_EXTENSION in p]
with zipfile.ZipFile(os.path.join(rls, "%s - %s%s" % (RELEASE_PREFIX, time.strftime("%Y-%m-%d %H-%M-%S", time.gmtime()), RELEASE_EXTENSION)), "w") as releaseZip:
with zipfile.ZipFile(os.path.join(rls, "%s - %s%s" % (RELEASE_PREFIX, releaseVersion, RELEASE_EXTENSION)), "w") as releaseZip:
releaseZip.write(licenseFile, licenseRelPath)
releaseZip.write(readmeFile, readmeRelPath)
for package in packages:
Expand Down

0 comments on commit 1883c84

Please sign in to comment.