Skip to content

Do pkg release if there are changes in it. #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions bin/release
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env bash

set -e
set -x

if (( "$#" != 1 ))
then
Expand All @@ -17,6 +16,10 @@ CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`

for REMOTE in origin psr-queue stomp amqp-ext sqs fs redis dbal null enqueue simple-client enqueue-bundle job-queue test
do
echo ""
echo ""
echo "Releasing $REMOTE";

TMP_DIR="/tmp/enqueue-repo"
REMOTE_URL=`git remote get-url $REMOTE`

Expand All @@ -25,9 +28,20 @@ do

(
cd $TMP_DIR;
git clone $REMOTE_URL . --depth=10
git clone $REMOTE_URL . --depth=200
git checkout $CURRENT_BRANCH;
git tag $1 -s -m "Release $1"
git push origin --tags
LAST_RELEASE=$(git tag -l [0-9].* | tail -n1)

echo "Last release $LAST_RELEASE";

CHANGES_SINCE_LAST_RELEASE=$(git log $LAST_RELEASE...master | xargs echo -n)
if [[ ! -z "$CHANGES_SINCE_LAST_RELEASE" ]]; then
echo "There are changes since last release. Releasing $1";

git tag $1 -s -m "Release $1"
git push origin --tags
else
echo "No change since last release.";
fi
)
done