-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed repo structure to match other Pions repos. Changed CI to match other Pions repos.
- Loading branch information
Showing
90 changed files
with
149 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# Unshallow the repo, this check doesn't work with this enabled | ||
# https://github.com/travis-ci/travis-ci/issues/3412 | ||
if [ -f $(git rev-parse --git-dir)/shallow ]; then | ||
git fetch --unshallow || true | ||
fi | ||
|
||
SCRIPT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) | ||
|
||
CONTRIBUTORS=() | ||
EXCLUDED_CONTIBUTORS=('John R. Bradley') | ||
MISSING_CONTIBUTORS=() | ||
|
||
shouldBeIncluded () { | ||
for i in "${EXCLUDED_CONTIBUTORS[@]}" | ||
do | ||
if [ "$i" == "$1" ] ; then | ||
return 1 | ||
fi | ||
done | ||
return 0 | ||
} | ||
|
||
|
||
IFS=$'\n' #Only split on newline | ||
for contributor in $(git log --format='%aN' | sort -u) | ||
do | ||
if shouldBeIncluded $contributor; then | ||
if ! grep -q "$contributor" "$SCRIPT_PATH/../README.md"; then | ||
MISSING_CONTIBUTORS+=("$contributor") | ||
fi | ||
fi | ||
done | ||
unset IFS | ||
|
||
if [ ${#MISSING_CONTIBUTORS[@]} -ne 0 ]; then | ||
echo "Please add the following contributors to the README" | ||
for i in "${MISSING_CONTIBUTORS[@]}" | ||
do | ||
echo "$i" | ||
done | ||
exit 1 | ||
fi |
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,60 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
display_commit_message_error() { | ||
cat << EndOfMessage | ||
$1 | ||
------------------------------------------------- | ||
The preceding commit message is invalid | ||
it failed '$2' of the following checks | ||
* Separate subject from body with a blank line | ||
* Limit the subject line to 50 characters | ||
* Capitalize the subject line | ||
* Do not end the subject line with a period | ||
* Wrap the body at 72 characters | ||
EndOfMessage | ||
|
||
exit 1 | ||
} | ||
|
||
lint_commit_message() { | ||
if [[ "$(echo "$1" | awk 'NR == 2 {print $1;}' | wc -c)" -ne 1 ]]; then | ||
display_commit_message_error "$1" 'Separate subject from body with a blank line' | ||
fi | ||
|
||
if [[ "$(echo "$1" | head -n1 | wc -m)" -gt 50 ]]; then | ||
display_commit_message_error "$1" 'Limit the subject line to 50 characters' | ||
fi | ||
|
||
if [[ ! $1 =~ ^[A-Z] ]]; then | ||
display_commit_message_error "$1" 'Capitalize the subject line' | ||
fi | ||
|
||
if [[ "$(echo "$1" | awk 'NR == 1 {print substr($0,length($0),1)}')" == "." ]]; then | ||
display_commit_message_error "$1" 'Do not end the subject line with a period' | ||
fi | ||
|
||
if [[ "$(echo "$1" | awk '{print length}' | sort -nr | head -1)" -gt 72 ]]; then | ||
display_commit_message_error "$1" 'Wrap the body at 72 characters' | ||
fi | ||
} | ||
|
||
if [ "$#" -eq 1 ]; then | ||
if [ ! -f "$1" ]; then | ||
echo "$0 was passed one argument, but was not a valid file" | ||
exit 1 | ||
fi | ||
lint_commit_message "$(sed -n '/# Please enter the commit message for your changes. Lines starting/q;p' "$1")" | ||
else | ||
# TRAVIS_COMMIT_RANGE is empty for initial branch commit | ||
if [[ "${TRAVIS_COMMIT_RANGE}" != *"..."* ]]; then | ||
parent=$(git log -n 1 --format="%P" ${TRAVIS_COMMIT_RANGE}) | ||
TRAVIS_COMMIT_RANGE="${TRAVIS_COMMIT_RANGE}...$parent" | ||
fi | ||
|
||
for commit in $(git rev-list ${TRAVIS_COMMIT_RANGE}); do | ||
lint_commit_message "$(git log --format="%B" -n 1 $commit)" | ||
done | ||
fi |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,2 @@ | ||
// Package e2e contains end to end tests for pions/dtls | ||
package e2e |
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
File renamed without changes.
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package cmd | ||
package util | ||
|
||
import ( | ||
"bufio" | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,6 @@ | ||
module github.com/pions/dtls | ||
|
||
require ( | ||
github.com/pions/transport v0.1.0 | ||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b | ||
) |
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,4 @@ | ||
github.com/pions/transport v0.1.0 h1:9IEn3i8pmK8rMyQIqhT2RozgXJNH4k+IuNDzV5y+ddw= | ||
github.com/pions/transport v0.1.0/go.mod h1:HLhzI7I0k8TyiQ99hfRZNRf84lG76eaFnZHnVy/wFnM= | ||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b h1:Elez2XeF2p9uyVj0yEUDqQ56NFcDtcBNkYP7yv8YbUE= | ||
golang.org/x/crypto v0.0.0-20190123085648-057139ce5d2b/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.