-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #359 from Catrobat/develop
[RELEASE] 1.4.0
- Loading branch information
Showing
114 changed files
with
12,071 additions
and
7,699 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,11 +4,52 @@ | |
Catrobat Brick Support Checker Action | ||
' | ||
|
||
GITTOKEN="$2" | ||
LANGUAGE_UPDATE_FLAG="/langupdate.txt" | ||
BRANCH="BLOCKS-MAINTENANCE-language_update" | ||
|
||
# Create directory where the Catroid and Catblocks projects should be cloned to | ||
mkdir $WORKDIR && cd $WORKDIR | ||
|
||
git clone $CATBLOCKS | ||
git clone "https://github.com/${CATBLOCKS}.git" | ||
git clone $CATROID | ||
|
||
cd Catblocks/ | ||
git config user.email "[email protected]" | ||
git config user.name "Catblocks GitHub Action" | ||
|
||
if git show-ref --quiet refs/remotes/origin/${BRANCH}; then | ||
git fetch origin ${BRANCH} | ||
git checkout ${BRANCH} | ||
git merge origin develop | ||
echo '>> Existing branch found!' | ||
else | ||
git checkout -b ${BRANCH} | ||
git push -u origin ${BRANCH} | ||
echo '<< New branch created!' | ||
fi | ||
|
||
cd .. | ||
|
||
# run checker & send report | ||
python3 /checker.py "$WORKDIR" "$1" | ||
rm -f $LANGUAGE_UPDATE_FLAG | ||
python3 /checker.py "$WORKDIR" "$1" | ||
RETVALUE="$?" | ||
|
||
# push language updates to repository and create PR | ||
# checker.py creates a file if the PR is necessary | ||
if test -f $LANGUAGE_UPDATE_FLAG; then | ||
echo '>> Language update found! PR will be created.' | ||
|
||
cd Catblocks/ | ||
|
||
git add i18n/catroid_strings/ | ||
git commit -m 'BLOCK-MAINTENANCE update languages' | ||
git push "https://${GITHUB_ACTOR}:${GITTOKEN}@github.com/${CATBLOCKS}.git" $BRANCH | ||
|
||
curl -s -o /dev/null -w "%{http_code}" -i -H "Authorization: token ${GITTOKEN}" -X POST -d '{ "title": "BLOCK-MAINTENANCE update languages", "body": "Languages automatically fetched from Catroid.", "head": "'${BRANCH}'", "base": "develop" }' https://api.github.com/repos/$CATBLOCKS/pulls | tac | tac | grep -qsE "200|201|422" | ||
RETVALUE=$(($? + $RETVALUE)) | ||
fi | ||
|
||
echo $RETVALUE | ||
exit $RETVALUE |
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ cd /github/workspace/ | |
# build render | ||
yarn install | ||
yarn clean | ||
yarn render:build | ||
yarn render:ghpages | ||
RETVALUE="$?" | ||
|
||
mv ./dist ./../dist | ||
|
@@ -31,8 +31,9 @@ COMMITMSG="Deploy: Merged Pull Request #${PRNUMBER}" | |
git config user.email "[email protected]" | ||
git config user.name "GitHub Action" | ||
git add ./develop | ||
git commit -m $COMMITMSG | ||
git commit -m "$COMMITMSG" | ||
|
||
git push "https://${GITHUB_ACTOR}:${GITTOKEN}@github.com/Catrobat/Catblocks.git" "gh-pages" | ||
RETVALUE=$(($? + $RETVALUE)) | ||
|
||
exit $RETVALUE |
Oops, something went wrong.