1. Alister Cordiner
  2. csvquerytool


acordiner  committed 3f1237d

Added some comments

  • Participants
  • Parent commits 694984a
  • Branches default

Comments (0)

Files changed (1)

File deploy.sh

View file
  • Ignore whitespace
 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
 if [ -f "$VERSION_FILE" ]; then
     echo "Nothing to do (latest version $deployed_version already deployed)"
     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"
         echo "$latest_version" > $VERSION_FILE
-        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