Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
90e4670c
"litemall-admin/git@ustchcs.com:gujinli1118/litemall.git" did not exist on "e9d284f5950d70fa8b609135688847c4c5fa2a28"
Commit
90e4670c
authored
Jul 21, 2017
by
Dave Machado
Browse files
check for no links in link file and fail if not pull request
parent
ab5d27c5
Changes
2
Show whitespace changes
Inline
Side-by-side
build/main.sh
View file @
90e4670c
...
@@ -27,6 +27,9 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then
...
@@ -27,6 +27,9 @@ if [ "$TRAVIS_BRANCH" == "master" ]; then
echo
"link validation failed!"
echo
"link validation failed!"
exit
1
exit
1
else
else
if
[
"
$TRAVIS_PULL_REQUEST
"
==
"false"
]
;
then
echo
"no links to check on
$TRAVIS_BRANCH
branch - script failure!"
fi
echo
"link validation passed!"
echo
"link validation passed!"
fi
fi
fi
fi
build/validate_links.rb
View file @
90e4670c
...
@@ -17,6 +17,10 @@ raw_links.each do |link|
...
@@ -17,6 +17,10 @@ raw_links.each do |link|
links
.
push
(
link
)
links
.
push
(
link
)
end
end
end
end
if
links
.
length
<=
0
puts
"no links to check"
exit
(
0
)
end
fails
=
[]
fails
=
[]
# Fail on any duplicate elements
# Fail on any duplicate elements
dup
=
links
.
select
{
|
element
|
links
.
count
(
element
)
>
1
}
dup
=
links
.
select
{
|
element
|
links
.
count
(
element
)
>
1
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment