Skip to content
This repository has been archived by the owner on Feb 6, 2019. It is now read-only.

Commit

Permalink
adding release creation script
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy McFadden committed Jun 8, 2015
1 parent 967027d commit 23b7367
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
__pycache__/
*.py[cod]

# Release files
release/

# C extensions
*.so

Expand Down
32 changes: 32 additions & 0 deletions scripts/create-release.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python2.4
"""
This script is used to create the release file.
"""

# Imports ######################################################################
import os


# Metadata #####################################################################
__author__ = "Timothy McFadden"
__creationDate__ = "06/08/2015"
__license__ = "MIT"


# Globals ######################################################################
THIS_DIR = os.path.abspath(os.path.dirname(__file__))
SRC = os.path.join(THIS_DIR, "..", "src", "storcli_check.py")
DEST_DIR = os.path.join(THIS_DIR, "..", "release")

if __name__ == '__main__':
import imp
import tarfile

# Read the version from our project
mod = imp.load_source("storcli_check", SRC)

destination = os.path.join(DEST_DIR, "storcli_check-%s.tar.gz" % mod.__version__)
with tarfile.open(destination, "w:gz") as tar:
tar.add(SRC, "storcli_check.py")

print "[%s] created" % destination

0 comments on commit 23b7367

Please sign in to comment.