Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
d716f2d4
Commit
d716f2d4
authored
10 years ago
by
Ludwig Knüpfer
Browse files
Options
Downloads
Patches
Plain Diff
dist/licenses: add and use --error-exitcode
parent
1574c2bb
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.travis.yml
+1
-1
1 addition, 1 deletion
.travis.yml
dist/tools/licenses/check.sh
+9
-1
9 additions, 1 deletion
dist/tools/licenses/check.sh
with
10 additions
and
2 deletions
.travis.yml
+
1
−
1
View file @
d716f2d4
...
...
@@ -43,7 +43,7 @@ script:
-
make -s -C ./examples/default info-concurrency
-
git rebase riot/master || git rebase --abort
-
./dist/tools/licenses/check.sh master --diff-filter=MR
-
./dist/tools/licenses/check.sh master --diff-filter=MR
--error-exitcode=0 || exit
-
./dist/tools/licenses/check.sh master --diff-filter=AC || exit
# TODO:
...
...
This diff is collapsed.
Click to expand it.
dist/tools/licenses/check.sh
+
9
−
1
View file @
d716f2d4
...
...
@@ -11,6 +11,7 @@ TMP="${CHECKROOT}/.tmp"
ROOT
=
$(
git rev-parse
--show-toplevel
)
LICENSES
=
$(
ls
"
${
LICENSEDIR
}
"
)
EXIT_CODE
=
0
ERROR_EXIT_CODE
=
"1"
# reset output dir
rm
-fr
"
${
OUTPUT
}
"
...
...
@@ -39,6 +40,13 @@ else
DIFFFILTER
=
"--diff-filter=ACMR"
fi
# If the --error-exitcode option is given, consume this parameter
# and overwrite the default ERROR_EXIT_CODE.
if
echo
"
${
1
}
"
|
grep
-q
'^--error-exitcode='
;
then
ERROR_EXIT_CODE
=
$(
echo
${
1
}
|
sed
-e
's/--error-exitcode=//'
)
shift
1
fi
# select files to check
if
[
-z
"
${
BRANCH
}
"
]
;
then
FILES
=
"
$(
git ls-tree
-r
--full-tree
--name-only
HEAD |
grep
-E
'\.([sSch]|cpp)$'
)
"
...
...
@@ -60,7 +68,7 @@ for FILE in ${FILES}; do
if
[
${
FAIL
}
=
1
]
;
then
echo
"
${
FILE
}
"
>>
"
${
UNKNOWN
}
"
echo
"file has an unknown license header: '
${
FILE
}
'"
EXIT_CODE
=
1
EXIT_CODE
=
${
ERROR_EXIT_CODE
}
fi
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment