Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
check in license file
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghuiwang committed Dec 9, 2019
1 parent f8fcb44 commit b9a83ed
Show file tree
Hide file tree
Showing 4 changed files with 9,828 additions and 8 deletions.
4 changes: 0 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,5 @@ RUN bazel build -c opt --define=grpc_no_ares=true //... ${EXTRA_BAZEL_ARGS}

RUN cp bazel-bin/server/${OUTPUT_DIR}/server server/server

# Copy Licenses
RUN mkdir -p third_party/library
RUN cd third_party_licenses && python3 concatenate_license.py && mv license.txt ../third_party/library/license.txt

CMD ["./server/server"]

17 changes: 15 additions & 2 deletions test/scripts/unittests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,23 @@
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

export PATH="$PATH:$HOME/bin"

make swagger-py-client

bazel build -c opt --define=grpc_no_ares=true //...
bazel test -c opt --define=grpc_no_ares=true //...

# Check licenses
rm -f /tmp/generated_license.txt /tmp/generated_dep.txt

go list -m all | cut -d ' ' -f 1 > /tmp/generated_dep.txt

if ! diff /tmp/generated_dep.txt third_party_licenses/dep.txt; then
echo "Please follow third_party_licenses/README.md to update the license file for changed dependencies."

This comment has been minimized.

Copy link
@Bobgy

Bobgy Dec 11, 2019

Contributor

Presubmit check looks good. It seems you should also exit 1 here. Did I miss anything?

fi

(cd third_party_licenses && python3 concatenate_license.py --output=/tmp/generated_license.txt)
if ! diff /tmp/generated_license.txt third_party/library/license.txt; then
echo "Please follow third_party_licenses/README.md to regenerate third_party/library/license.txt."

This comment has been minimized.

Copy link
@Bobgy

Bobgy Dec 11, 2019

Contributor

and here

fi
Loading

0 comments on commit b9a83ed

Please sign in to comment.