Skip to content

Commit

Permalink
Add missing copyright headers (#21000)
Browse files Browse the repository at this point in the history
Summary:
One of our automated project tools noted that these were all missing their copyright headers.
Pull Request resolved: #21000

Differential Revision: D9721495

Pulled By: hramos

fbshipit-source-id: 6ccf0f37165a0fe16cf06bd996d615f2286101dc
  • Loading branch information
hramos authored and facebook-github-bot committed Sep 7, 2018
1 parent e855152 commit fe4f035
Show file tree
Hide file tree
Showing 31 changed files with 150 additions and 28 deletions.
5 changes: 5 additions & 0 deletions React.podspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# coding: utf-8
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

require "json"

package = JSON.parse(File.read(File.join(__dir__, "package.json")))
Expand Down
5 changes: 5 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
:: Copyright (c) 2015-present, Facebook, Inc.
::
:: This source code is licensed under the MIT license found in the
:: LICENSE file in the root directory of this source tree.

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand Down
5 changes: 5 additions & 0 deletions react.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// Copyright (c) 2015-present, Facebook, Inc.

// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

import org.apache.tools.ant.taskdefs.condition.Os

def config = project.hasProperty("react") ? project.react : [];
Expand Down
5 changes: 5 additions & 0 deletions runXcodeTests.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# This script should be run from the react-native root

THIS_DIR=$(cd -P "$(dirname "$(readlink "${BASH_SOURCE[0]}" || echo "${BASH_SOURCE[0]}")")" && pwd)
Expand Down
6 changes: 6 additions & 0 deletions scripts/android-setup.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# inspired by https://github.com/Originate/guide/blob/master/android/guide/Continuous%20Integration.md

# shellcheck disable=SC1091
Expand Down
4 changes: 4 additions & 0 deletions scripts/circleci/analyze_code.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

cat <(echo eslint; npm run lint --silent -- --format=json; echo flow; npm run flow --silent -- check --json) | node scripts/circleci/code-analysis-bot.js

Expand Down
4 changes: 4 additions & 0 deletions scripts/circleci/apt-get-android-deps.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

Expand Down
4 changes: 4 additions & 0 deletions scripts/circleci/buck_fetch.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -ex

Expand Down
4 changes: 4 additions & 0 deletions scripts/circleci/check_cache.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

Expand Down
4 changes: 4 additions & 0 deletions scripts/circleci/check_license.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

Expand Down
6 changes: 5 additions & 1 deletion scripts/circleci/exec_author_check.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# This is meant to be used to keep failing tests from
# running for regular contributors, while still letting
# them run on PRs submitted by core contributors.
Expand Down
4 changes: 4 additions & 0 deletions scripts/circleci/exec_swallow_error.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# execute command
"$@"
Expand Down
6 changes: 5 additions & 1 deletion scripts/circleci/gradle_download_deps.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
./gradlew :ReactAndroid:downloadBoost :ReactAndroid:downloadDoubleConversion :ReactAndroid:downloadFolly :ReactAndroid:downloadGlog :ReactAndroid:downloadJSCHeaders
7 changes: 6 additions & 1 deletion scripts/ios-configure-glog.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -e

PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
Expand All @@ -10,7 +15,7 @@ if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then

if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
CURRENT_ARCH="x86_64"
else
else
CURRENT_ARCH="armv7"
fi
fi
Expand Down
4 changes: 4 additions & 0 deletions scripts/ios-install-third-party.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

cachedir="$HOME/.rncache"
mkdir -p "$cachedir"
Expand Down
1 change: 0 additions & 1 deletion scripts/launchPackager.command
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
Expand Down
9 changes: 7 additions & 2 deletions scripts/objc-test-ios.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/bin/bash
set -ex

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Script used to run iOS tests.
# If not arguments are passed to the script, it will only compile
# the RNTester.
# If the script is called with a single argument "test", we'll
# also run the RNTester integration test (needs JS and packager):
# ./objc-test-ios.sh test

set -ex

SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT=$(dirname "$SCRIPTS")

Expand Down
9 changes: 7 additions & 2 deletions scripts/objc-test-tvos.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
#!/bin/bash
set -ex

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Script used to run tvOS tests.
# If not arguments are passed to the script, it will only compile
# the RNTester.
# If the script is called with a single argument "test", we'll
# also run the RNTester integration test (needs JS and packager):
# ./objc-test-tvos.sh test

set -ex

SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT=$(dirname "$SCRIPTS")

Expand Down
9 changes: 7 additions & 2 deletions scripts/objc-test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -ex

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Script used to run iOS and tvOS tests.
# Environment variables are used to configure what test to run.
# If not arguments are passed to the script, it will only compile
Expand All @@ -9,6 +12,8 @@ set -ex
# also run the RNTester integration test (needs JS and packager).
# ./objc-test.sh test

set -ex

SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
ROOT=$(dirname $SCRIPTS)

Expand Down
1 change: 0 additions & 1 deletion scripts/packager.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
Expand Down
5 changes: 5 additions & 0 deletions scripts/process-podspecs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/bin/bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

set -ex

SCRIPTS=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
Expand Down
2 changes: 1 addition & 1 deletion scripts/react-native-xcode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

#
# Bundle React Native app's code and image assets.
# This script is supposed to be invoked as part of Xcode build process
# and relies on environment variables (including PWD) set by Xcode
Expand Down
6 changes: 5 additions & 1 deletion scripts/run-android-emulator.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Runs an Android emulator locally.
# If there already is a running emulator, this just uses that.
# The only reason to use this config is that it represents a known-good
Expand Down
6 changes: 5 additions & 1 deletion scripts/run-android-local-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Runs all Android integration tests locally.
# See http://facebook.github.io/react-native/docs/testing.html

Expand Down
6 changes: 5 additions & 1 deletion scripts/run-android-local-unit-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Runs all Android unit tests locally.
# See http://facebook.github.io/react-native/docs/testing.html

Expand Down
12 changes: 8 additions & 4 deletions scripts/run-instrumentation-tests-via-adb-shell.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# Python script to run instrumentation tests, copied from https://github.com/circleci/circle-dummy-android
# Example: ./scripts/run-android-instrumentation-tests.sh com.facebook.react.tests com.facebook.react.tests.ReactPickerTestCase
#
Expand All @@ -24,7 +28,7 @@ test_class = None
if len(sys.argv) > 2:
test_class = sys.argv[2]
def update():
# prevent CircleCI from killing the process for inactivity
while not done:
Expand All @@ -38,10 +42,10 @@ t.start()
def run():
sp.Popen(['adb', 'wait-for-device']).communicate()
if (test_class != None):
p = sp.Popen('adb shell am instrument -w -e class %s %s/android.support.test.runner.AndroidJUnitRunner'
p = sp.Popen('adb shell am instrument -w -e class %s %s/android.support.test.runner.AndroidJUnitRunner'
% (test_class, test_app), shell=True, stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE)
else :
p = sp.Popen('adb shell am instrument -w %s/android.support.test.runner.AndroidJUnitRunner'
p = sp.Popen('adb shell am instrument -w %s/android.support.test.runner.AndroidJUnitRunner'
% (test_app), shell=True, stdout=sp.PIPE, stderr=sp.PIPE, stdin=sp.PIPE)
return p.communicate()
Expand Down
5 changes: 5 additions & 0 deletions scripts/sync-css-layout.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash
# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.


function usage {
echo "usage: sync-css-layout.sh <pathToGithubRepo> <pathToFbSourceRepo>";
Expand Down
6 changes: 5 additions & 1 deletion scripts/validate-android-device-env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# This script validates that the Android environment is set up to run
# tests on a device or emulator (as opposed to a plain Java environment).

Expand Down
8 changes: 6 additions & 2 deletions scripts/validate-android-sdk.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# This script validates that the Android SDK is installed correctly.
# This means setting ANDROID_HOME and adding its subdirectories to PATH.
# If the Android SDK is not installed correctly, this script exits
Expand Down Expand Up @@ -48,4 +52,4 @@ if [ -z `which adb` ]; then
echo "See https://facebook.github.io/react-native/docs/getting-started.html for instructions."
exit 1
fi

8 changes: 6 additions & 2 deletions scripts/validate-android-test-env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Copyright (c) 2015-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
# This script validates that Android is set up correctly for the
# testing environment.
#
Expand Down Expand Up @@ -107,7 +111,7 @@ if [ -n "$(which csrutil)" ]; then
exit 1
fi
fi

if [ -z "$JAVA_HOME" ]; then
echo "Error: \$JAVA_HOME is not configured."
echo "Try adding export JAVA_HOME=\$(/usr/libexec/java_home) to your .bashrc or equivalent."
Expand Down
Loading

0 comments on commit fe4f035

Please sign in to comment.