Created
November 30, 2016 08:47
-
-
Save mohsin/1e303b78f3fab46c3fb06fbc39d59463 to your computer and use it in GitHub Desktop.
Plugin public-private repo issue solution
This file contains hidden or 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
#!/bin/sh | |
remote="$1" | |
url="$2" | |
message=$(git log -1 HEAD --pretty=format:%s) | |
public_repo="/Users/Moz/Desktop/public" | |
[ -d lang ] && yes | cp -rf lang/* $public_repo/lang | |
[ -d updates ] && yes | cp -rf updates/* $public_repo/updates | |
cd $public_repo | |
if [ ! -z "$(git status --porcelain)" ]; then | |
echo "\nCommitting and pushing public repo" | |
git commit -am "$message" | |
git push origin master | |
echo "Successfully updated public repo, continuing...\n" | |
fi | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment