mirror of
https://github.com/appium/appium.git
synced 2026-10-26 18:51:48 +08:00
make sure things are harmonious before publishing
This commit is contained in:
+13
-2
@@ -1,12 +1,23 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
git remote | grep "upstream"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "You need to have an 'upstream' remote to pull from / push tags to"
|
||||
exit 1
|
||||
fi
|
||||
git status | grep "nothing to commit (working directory clean)" >/dev/null
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Working directory isn't clean, commit/clean then publish"
|
||||
exit 1
|
||||
fi
|
||||
version=$(cat package.json | underscore extract version | sed 's/\"//g')
|
||||
rm -rf build/selendroid/selendroid.mod.apk
|
||||
git status | grep "Your branch is ahead" >/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "Your branch isn't in sync with master"
|
||||
exit 1
|
||||
fi
|
||||
git pull upstream master
|
||||
./reset.sh
|
||||
npm publish
|
||||
version=$(cat package.json | underscore extract version | sed 's/\"//g')
|
||||
git tag -a "v$version" -m "tag appium@$version for npm publish"
|
||||
git push --tags upstream master
|
||||
|
||||
Reference in New Issue
Block a user