File tree 1 file changed +18
-4
lines changed
1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
set -e
4
- set -x
5
4
6
5
if (( "$# " != 1 ))
7
6
then
@@ -17,6 +16,10 @@ CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
17
16
18
17
for REMOTE in origin psr-queue stomp amqp-ext sqs fs redis dbal null enqueue simple-client enqueue-bundle job-queue test
19
18
do
19
+ echo " "
20
+ echo " "
21
+ echo " Releasing $REMOTE " ;
22
+
20
23
TMP_DIR=" /tmp/enqueue-repo"
21
24
REMOTE_URL=` git remote get-url $REMOTE `
22
25
25
28
26
29
(
27
30
cd $TMP_DIR ;
28
- git clone $REMOTE_URL . --depth=10
31
+ git clone $REMOTE_URL . --depth=200
29
32
git checkout $CURRENT_BRANCH ;
30
- git tag $1 -s -m " Release $1 "
31
- git push origin --tags
33
+ LAST_RELEASE=$( git tag -l [0-9].* | tail -n1)
34
+
35
+ echo " Last release $LAST_RELEASE " ;
36
+
37
+ CHANGES_SINCE_LAST_RELEASE=$( git log $LAST_RELEASE ...master | xargs echo -n)
38
+ if [[ ! -z " $CHANGES_SINCE_LAST_RELEASE " ]]; then
39
+ echo " There are changes since last release. Releasing $1 " ;
40
+
41
+ git tag $1 -s -m " Release $1 "
42
+ git push origin --tags
43
+ else
44
+ echo " No change since last release." ;
45
+ fi
32
46
)
33
47
done
You can’t perform that action at this time.
0 commit comments