Source

csvquerytool / deploy.sh

#!/bin/bash

VERSION_FILE="VERSION.txt"

if [ -f "$VERSION_FILE" ]; then
    deployed_version=$(cat "$DEPLOYED_TAG_FILE")
else
    deployed_version=""
fi
latest_version=$(hg tags | head -2 | tail -1 | awk '{print $1}')
if [ "$deployed_version" = "$latest_version" ]; 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
        echo "Releasing new production version: $latest_version"
        python setup.py sdist upload
        echo "$latest_version" > $VERSION_FILE
    else
        echo "Error: package version ($package_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.