Skip to content

Commit 041e4b1

Browse files
committed
Swap build script.
Signed-off-by: Mior Muhammad Zaki <[email protected]>
1 parent 1cc3c0b commit 041e4b1

7 files changed

+85
-55
lines changed

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# Ignore following folder/file.
55
/.github export-ignore
6-
/build export-ignore
6+
/bin export-ignore
77
/docs export-ignore
88
/tests export-ignore
99
/.coveralls.yml export-ignore

bin/release.sh

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
CURRENT_BRANCH="4.x"
6+
COMPONENTS=("facades" "providers" "core")
7+
8+
if (( "$#" != 1 ))
9+
then
10+
echo "Tag has to be provided"
11+
12+
exit 1
13+
fi
14+
VERSION=$1
15+
16+
# Always prepend with "v"
17+
if [[ $VERSION != v* ]]
18+
then
19+
VERSION="v$VERSION"
20+
fi
21+
22+
# Tag Component
23+
git tag $VERSION
24+
git push origin --tags
25+
26+
# Tag Components
27+
for REMOTE in "${COMPONENTS[@]}"
28+
do
29+
echo ""
30+
echo ""
31+
echo "Releasing $REMOTE";
32+
33+
TMP_DIR="/tmp/orchestra-support-split"
34+
REMOTE_URL="[email protected]:orchestral/support-$REMOTE.git"
35+
36+
rm -rf $TMP_DIR;
37+
mkdir $TMP_DIR;
38+
39+
(
40+
cd $TMP_DIR;
41+
42+
git clone $REMOTE_URL .
43+
git checkout "$CURRENT_BRANCH";
44+
45+
git tag $VERSION
46+
git push origin --tags
47+
)
48+
done

bin/split.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -x
5+
6+
CURRENT_BRANCH="4.x"
7+
8+
function split()
9+
{
10+
SHA1=`splitsh-lite --prefix=$1`
11+
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH" -f
12+
}
13+
14+
function add_remote()
15+
{
16+
git remote add $1 $2 || true
17+
}
18+
19+
function remove_remote()
20+
{
21+
git remote remove $1 || true
22+
}
23+
24+
git pull origin $CURRENT_BRANCH
25+
26+
add_remote core [email protected]:orchestral/support-core.git
27+
add_remote facades [email protected]:orchestral/support-facades.git
28+
add_remote providers [email protected]:orchestral/support-providers.git
29+
30+
split 'src/Support' core
31+
split 'src/Facades' facades
32+
split 'src/Providers' providers
33+
34+
remove_remote core
35+
remove_remote facades
36+
remove_remote providers

build/subsplit-basic.sh

-11
This file was deleted.

build/subsplit-branch.sh

-16
This file was deleted.

build/subsplit-full.sh

-11
This file was deleted.

build/subsplit-tag.sh

-16
This file was deleted.

0 commit comments

Comments
 (0)