Anonymous avatar Anonymous committed 3f1237d

Added some comments

Comments (0)

Files changed (1)

 set -e
 set -o pipefail
 
+# This script builds the latest Python module and uploads it to Pypi. It keeps 
+# a record of the latest uploaded version in $VERSION_FILE, and only uploads
+# a new module if a new version has been tagged. The steps are:
+#
+#     1. Run "hg tags" and find the latest tag name that comes after the tip.
+#        e.g. "1.2.0"
+#     2. If $VERSION_FILE contains the string "1.2.0" then exit
+#     3. Build the module "foobar-1.2.0.tar.gz" and upload it to Pypi
+#     4. Write the string "1.2.0" to $VERSION_FILE
+
 VERSION_FILE="VERSION.txt"
 
 if [ -f "$VERSION_FILE" ]; then
     echo "Nothing to do (latest version $deployed_version already deployed)"
 else
     echo "Deploying version $latest_version to production"
-    package_version=$(python setup.py --version)
-    if [ "$package_version" = "$latest_version" ]; then
+    module_version=$(python setup.py --version)
+    if [ "$module_version" = "$latest_version" ]; then
         echo "Releasing new production version: $latest_version"
         distutils_output=$(python setup.py sdist upload 2>&1)
         echo "$distutils_output"
         fi
         echo "$latest_version" > $VERSION_FILE
     else
-        echo "Error: package version ($package_version) != SCM tag ($latest_version); did you update setup.py and .hgtags?" >&2
+        echo "Error: module version ($module_version) != SCM tag ($latest_version); did you update setup.py and .hgtags?" >&2
         exit 1
     fi
 fi
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.