-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: 1052988 <s1052988@mail.ncyu.edu.tw>
Jun-Ru Chang
authored and
1052988
committed
May 11, 2019
1 parent
54badda
commit fba35ca
Showing
7 changed files
with
95 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
Example 5: | ||
Example 6: | ||
|
||
$ curl -s https://raw.githubusercontent.com/jrjang/ncyu-2019/ex5/scripts/ex5-pre.sh | bash -s -- https://github.com/YOUR_GITHUB_ACCOUNT/ncyu-2019 | ||
|
||
$ curl -s https://raw.githubusercontent.com/jrjang/ncyu-2019/ex5/scripts/ex5-test.sh | bash -s -- https://github.com/YOUR_GITHUB_ACCOUNT/ncyu-2019 | ||
$ curl -s https://raw.githubusercontent.com/jrjang/ncyu-2019/ex6/scripts/ex6-test.sh | bash -s -- https://github.com/YOUR_GITHUB_ACCOUNT/ncyu-2019 |
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,24 @@ | ||
official/ex0 | ||
official/ex1 | ||
official/ex2 | ||
official/ex3 | ||
official/ex3-2 | ||
official/ex4 | ||
official/ex4-2 | ||
official/ex4-3 | ||
official/ex5 | ||
official/ex5-2 | ||
official/ex6 | ||
origin/HEAD -> origin/ex0 | ||
origin/ex0 | ||
origin/ex1 | ||
origin/ex2 | ||
origin/ex3 | ||
origin/ex3-2 | ||
origin/ex4 | ||
origin/ex4-2 | ||
origin/ex4-3 | ||
origin/ex5 | ||
origin/ex5-2 | ||
origin/ex6 | ||
origin/ex6-2 |
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,24 @@ | ||
offical/ex0 | ||
offical/ex1 | ||
offical/ex2 | ||
offical/ex3 | ||
offical/ex3-2 | ||
offical/ex4 | ||
offical/ex4-2 | ||
offical/ex4-3 | ||
offical/ex5 | ||
offical/ex5-2 | ||
offical/ex6 | ||
origin/HEAD -> origin/ex0 | ||
origin/ex0 | ||
origin/ex1 | ||
origin/ex2 | ||
origin/ex3 | ||
origin/ex3-2 | ||
origin/ex4 | ||
origin/ex4-2 | ||
origin/ex4-3 | ||
origin/ex5 | ||
origin/ex5-2 | ||
origin/ex6 | ||
origin/ex6-2 |
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,30 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if ! [[ "$1" =~ "https://github.com/" ]]; then | ||
echo "Please provide your Github ncyu-2019 project url" | ||
exit 1 | ||
fi | ||
|
||
GITHUB_URL=$1 | ||
GITHUB_REPO=`echo ${GITHUB_URL#https://github.com/}` | ||
GITHUB_PROJECT=`echo $GITHUB_REPO | cut -d '/' -f 2` | ||
PROJECT_BRANCH=ex6 | ||
DIR_LOCAL=$GITHUB_PROJECT | ||
|
||
GIT_NAME=`git config -l | grep user.name | cut -d '=' -f 2` | ||
|
||
COMMIT_MSG="[Example 6] $GIT_NAME" | ||
|
||
git checkout -t origin/$PROJECT_BRANCH -b $PROJECT_BRANCH | ||
git diff origin/ex0 origin/$PROJECT_BRANCH-2 --name-only > ex6.txt | ||
git add ex6.txt | ||
git branch -r > ex6-branch.txt | ||
git add ex6-branch.txt | ||
git commit -s -q --amend -m "$COMMIT_MSG" | ||
git push -f -q origin HEAD:refs/heads/$PROJECT_BRANCH | ||
|
||
hub pull-request -b jrjang/$GITHUB_PROJECT:$PROJECT_BRANCH -h $GITHUB_REPO:$PROJECT_BRANCH -m "$COMMIT_MSG" | ||
echo "[STATUS] Example 6: Github PR done" | ||
|
||
echo "[STATUS] Example 6: done" |
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,14 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ `cat ex6.txt | wc -l` -ne 0 ]; then | ||
echo "Your push operation is incorrect!" | ||
exit 1 | ||
fi | ||
|
||
if [ `diff ex6-branch.txt data/ex6-branch.txt | wc -l` -ne 0 ]; then | ||
echo "Your adding remote operation is incorrect!" | ||
exit 1 | ||
fi | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -1 +1 @@ | ||
ex5-verify.sh | ||
ex6-verify.sh |