-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4d43a15
commit 5cfa672
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ composer.lock | |
/mkdocs.yml | ||
/docs/ | ||
/site/ | ||
/.subsplit/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
rm -rf .subsplit | ||
git subsplit init `git config --get remote.origin.url` | ||
git subsplit update | ||
for file in `ls */composer.json`; do | ||
target=`node getValueFromJsonFile.js $file extra.component.target` | ||
repo_uri=`echo $target | cut -d "." -f1` | ||
desc=`node getValueFromJsonFile.js $file description` | ||
dir_name=`dirname $file` | ||
hub create -d "$desc" $repo_uri | ||
git subsplit publish \ | ||
$dir_name:[email protected]:$target \ | ||
--heads=master \ | ||
--no-tags | ||
|
||
# create tag | ||
echo -e "\ncreate tag" | ||
version=`node getValueFromJsonFile.js $file version` | ||
repo_name=`echo $repo_uri | cut -d "/" -f2` | ||
rm -rf /tmp/$repo_name | ||
pushd /tmp/ | ||
git clone [email protected]:$target | ||
pushd /tmp/$repo_name | ||
tag_exists=`git ls-remote origin refs/tags/$version` | ||
if [ -z $tag_exists ]; then | ||
git tag -a $version -m 'new version' | ||
git push --tags | ||
fi | ||
pushd +2 | ||
dirs -c | ||
dirs -v | ||
done |