Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5060c9d

Browse files
committed
Explain what each step in the init script achieves
This adds comments to init-tests-after-clone.sh to explain whateach of the steps is doing that is needed by some of the tests.It also refactors some recently added logic, in a way that lendsitself to greater clarity when combined with these comments.
1 parentf6dbba2 commit5060c9d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

‎init-tests-after-clone.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,26 @@ if test -z "$TRAVIS"; then
1313
esac
1414
fi
1515

16+
# Stop if we have run this. (You can delete __testing_point__ to let it rerun.)
17+
# This also keeps track of where we are, so we can get back here.
1618
git tag __testing_point__
19+
20+
# The tests need a branch called master.
1721
git checkout master --|| git checkout -b master
22+
23+
# The tests need a reflog history on the master branch.
1824
git reset --hard HEAD~1
1925
git reset --hard HEAD~1
2026
git reset --hard HEAD~1
27+
28+
# Point the master branch where we started, so we test the correct code.
2129
git reset --hard __testing_point__
2230

23-
test -z"$TRAVIS"||exit 0# CI jobs will already have taken care of the rest.
31+
# Do some setup that CI takes care of but that may not have been done locally.
32+
iftest -z"$TRAVIS";then
33+
# The tests needs some version tags. Try to get them even in forks.
34+
git fetch --all --tags
2435

25-
git fetch --all --tags
26-
git submodule update --init --recursive
36+
# The tests need submodules, including a submodule with a submodule.
37+
git submodule update --init --recursive
38+
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp