Skip to content

Commit

Permalink
updated_version.sh prints the current version if no args are given.
Browse files Browse the repository at this point in the history
  • Loading branch information
braincore committed Aug 10, 2016
1 parent 434768d commit 4bc887d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions update_version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/sh
if [ -z $1 ]; then echo "error: $0 needs a version number as argument."; fi
sed -i "s/^__version__.*/__version__ = '$1'/g" dropbox/dropbox.py
if [ -z $1 ]; then
echo "error: $0 needs a version number as argument. Current version: `python -c 'import dropbox; print(dropbox.__version__)'`";
else
sed -i "s/^__version__.*/__version__ = '$1'/g" dropbox/dropbox.py
fi

0 comments on commit 4bc887d

Please sign in to comment.