Update css-layout sync scripts
Reviewed By: emilsjolander Differential Revision: D3424265 fbshipit-source-id: b1a765bbe11f776e418ae8b01c5c2a292f590a6b
This commit is contained in:
Родитель
b7352b4667
Коммит
0a9cc99a4f
|
@ -1,24 +1,15 @@
|
|||
/**
|
||||
*
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* !! This file is a check-in from github! !!
|
||||
* !! !!
|
||||
* !! You should not modify this file directly. Instead: !!
|
||||
* !! 1) Go to https://github.com/facebook/css-layout !!
|
||||
* !! 2) Make a pull request and get it merged !!
|
||||
* !! 3) Copy the file from github to here !!
|
||||
* !! (don't forget to keep this header) !!
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* @generated
|
||||
*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
// NOTE: this file is auto-copied from https://github.com/facebook/css-layout
|
||||
// @generated SignedSource<<0c8bd7e17fc12884003809cf282b0988>>
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,24 +1,15 @@
|
|||
/**
|
||||
*
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* !! This file is a check-in from github! !!
|
||||
* !! !!
|
||||
* !! You should not modify this file directly. Instead: !!
|
||||
* !! 1) Go to https://github.com/facebook/css-layout !!
|
||||
* !! 2) Make a pull request and get it merged !!
|
||||
* !! 3) Copy the file from github to here !!
|
||||
* !! (don't forget to keep this header) !!
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* @generated
|
||||
*
|
||||
* Copyright (c) 2014, Facebook, Inc.
|
||||
* Copyright (c) 2014-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
// NOTE: this file is auto-copied from https://github.com/facebook/css-layout
|
||||
// @generated SignedSource<<c504fae9470271c5617f345667bef8ad>>
|
||||
|
||||
|
||||
#ifndef __LAYOUT_H
|
||||
#define __LAYOUT_H
|
||||
|
||||
|
|
|
@ -4,11 +4,12 @@ The code here should be kept in sync with GitHub.
|
|||
HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/383d8a6b3dcbdb978e012e29040e1a43157765c6
|
||||
|
||||
There is generated code in:
|
||||
- README.facebook (this file)
|
||||
- java/com/facebook/csslayout (this folder)
|
||||
- javatests/com/facebook/csslayout
|
||||
- README (this file)
|
||||
- fbandroid/java/com/facebook/csslayout
|
||||
- fbandroid/javatests/com/facebook/csslayout
|
||||
- fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout
|
||||
|
||||
The code was generated by running 'make' in the css-layout folder and running:
|
||||
|
||||
./syncFromGithub.sh <pathToGithubRepo> <pathToFbAndroid>
|
||||
scripts/sync-css-layout.sh <pathToGithubRepo> <pathToFbSourceRepo>
|
||||
|
|
@ -5,8 +5,11 @@ HEAD at the time this code was synced: https://github.com/facebook/css-layout/co
|
|||
|
||||
There is generated code in:
|
||||
- README (this file)
|
||||
- java/com/facebook/csslayout (this folder)
|
||||
- javatests/com/facebook/csslayout
|
||||
- fbandroid/java/com/facebook/csslayout
|
||||
- fbandroid/javatests/com/facebook/csslayout
|
||||
- fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout
|
||||
|
||||
The code was generated by running 'make' in the css-layout folder and copied to React Native.
|
||||
The code was generated by running 'make' in the css-layout folder and running:
|
||||
|
||||
scripts/sync-css-layout.sh <pathToGithubRepo> <pathToFbSourceRepo>
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function usage {
|
||||
echo "usage: syncFromGithub.sh <pathToGithubRepo> <pathToFbAndroidRepo>";
|
||||
echo "usage: sync-css-layout.sh <pathToGithubRepo> <pathToFbSourceRepo>";
|
||||
}
|
||||
|
||||
function patchfile {
|
||||
# Add React Native copyright
|
||||
printf "/**\n" >> /tmp/csslayoutsync.tmp
|
||||
printf "/**\n" > /tmp/csslayoutsync.tmp
|
||||
printf " * Copyright (c) 2014-present, Facebook, Inc.\n" >> /tmp/csslayoutsync.tmp
|
||||
printf " * All rights reserved.\n" >> /tmp/csslayoutsync.tmp
|
||||
printf " * This source code is licensed under the BSD-style license found in the\n" >> /tmp/csslayoutsync.tmp
|
||||
|
@ -21,7 +21,7 @@ function patchfile {
|
|||
printf "!plEphiEmie@IsG>>\n\n" >> /tmp/csslayoutsync.tmp
|
||||
tail -n +9 $1 >> /tmp/csslayoutsync.tmp
|
||||
mv /tmp/csslayoutsync.tmp $1
|
||||
$ROOT/scripts/signedsource.py sign $1
|
||||
$ROOT/fbandroid/scripts/signedsource.py sign $1
|
||||
}
|
||||
|
||||
if [ -z $1 ]; then
|
||||
|
@ -44,15 +44,19 @@ pushd $GITHUB
|
|||
COMMIT_ID=$(git rev-parse HEAD)
|
||||
popd
|
||||
|
||||
SRC=$GITHUB/src/java/src/com/facebook/csslayout
|
||||
C_SRC=$GITHUB/src/
|
||||
JAVA_SRC=$GITHUB/src/java/src/com/facebook/csslayout
|
||||
TESTS=$GITHUB/src/java/tests/com/facebook/csslayout
|
||||
FBA_SRC=$ROOT/java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/csslayout/
|
||||
FBA_TESTS=$ROOT/javatests/com/facebook/csslayout
|
||||
FBA_SRC=$ROOT/fbandroid/java/com/facebook/catalyst/js/react-native-github/ReactAndroid/src/main/java/com/facebook/csslayout/
|
||||
FBA_TESTS=$ROOT/fbandroid/javatests/com/facebook/csslayout/
|
||||
FBO_SRC=$ROOT/fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout/
|
||||
|
||||
echo "Copying src files over..."
|
||||
cp $SRC/*.java $FBA_SRC
|
||||
echo "Copying test files over..."
|
||||
echo "Copying fbandroid src files over..."
|
||||
cp $JAVA_SRC/*.java $FBA_SRC
|
||||
echo "Copying fbandroid test files over..."
|
||||
cp $TESTS/*.java $FBA_TESTS
|
||||
echo "Copying fbobjc src files over..."
|
||||
cp $C_SRC/Layout.{c,h} $FBO_SRC
|
||||
|
||||
echo "Patching files..."
|
||||
for sourcefile in $FBA_SRC/*.java; do
|
||||
|
@ -61,23 +65,9 @@ done
|
|||
for testfile in $FBA_TESTS/*.java; do
|
||||
patchfile $testfile
|
||||
done
|
||||
|
||||
echo "Writing README.facebook"
|
||||
|
||||
echo "The source of truth for css-layout is: https://github.com/facebook/css-layout
|
||||
|
||||
The code here should be kept in sync with GitHub.
|
||||
HEAD at the time this code was synced: https://github.com/facebook/css-layout/commit/$COMMIT_ID
|
||||
|
||||
There is generated code in:
|
||||
- README.facebook (this file)
|
||||
- java/com/facebook/csslayout (this folder)
|
||||
- javatests/com/facebook/csslayout
|
||||
|
||||
The code was generated by running 'make' in the css-layout folder and running:
|
||||
|
||||
./syncFromGithub.sh <pathToGithubRepo> <pathToFbAndroid>
|
||||
" > $FBA_SRC/README.facebook
|
||||
for sourcefile in $FBO_SRC/Layout.{c,h}; do
|
||||
patchfile $sourcefile
|
||||
done
|
||||
|
||||
echo "Writing README"
|
||||
|
||||
|
@ -88,12 +78,14 @@ HEAD at the time this code was synced: https://github.com/facebook/css-layout/co
|
|||
|
||||
There is generated code in:
|
||||
- README (this file)
|
||||
- java/com/facebook/csslayout (this folder)
|
||||
- javatests/com/facebook/csslayout
|
||||
- fbandroid/java/com/facebook/csslayout
|
||||
- fbandroid/javatests/com/facebook/csslayout
|
||||
- fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout
|
||||
|
||||
The code was generated by running 'make' in the css-layout folder and copied to React Native.
|
||||
" > $FBA_SRC/README
|
||||
The code was generated by running 'make' in the css-layout folder and running:
|
||||
|
||||
echo "fbandroid was updated. Please also update the fbobjc version under" \
|
||||
"fbobjc/Libraries/FBReactKit/js/react-native-github/React/Layout/Layout.c."
|
||||
echo "Please run buck test //javatests/com/facebook/csslayout"
|
||||
scripts/sync-css-layout.sh <pathToGithubRepo> <pathToFbSourceRepo>
|
||||
" > /tmp/csslayoutsync.tmp
|
||||
|
||||
cp /tmp/csslayoutsync.tmp "$FBA_SRC/README"
|
||||
cp /tmp/csslayoutsync.tmp "$FBO_SRC/README"
|
Загрузка…
Ссылка в новой задаче