Skip to content

Commit

Permalink
fix(js): licenses & authors
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Sep 25, 2019
1 parent 40181c5 commit bb62339
Show file tree
Hide file tree
Showing 26 changed files with 70 additions and 6,780 deletions.
19 changes: 14 additions & 5 deletions js/Makefile
Expand Up @@ -29,7 +29,7 @@ lerna_upgrade := $(bin)/upd
lerna_exec := $(lerna) $(lerna_flags) exec --stream --parallel --scope=$1 --

json := $(bin)/json

caser := $(bin)/caser
eslint := $(bin)/eslint

pkg ?= $(shell find $(PWD)/packages -depth 1 -type d)
Expand Down Expand Up @@ -75,7 +75,7 @@ clean: clean
.IGNORE \
.PHONY: fclean
fclean: fclean
$(lerna_exec) /bin/bash -c '[ ! -f Makefile ] || make fclean'; \
$(lerna_exec) /bin/bash -c 'echo $$PWD && [ ! -f Makefile ] || make fclean'; \
rm -rf \
$(mod) \
$(pkg_mod)
Expand All @@ -95,23 +95,32 @@ pkg: $(mod)

.PHONY: rnpkg
rnpkg: name ?= example
rnpkg: pascal-name = $(shell echo $(name) | $(caser) --pascal)
rnpkg: export PWD := $(PWD)
rnpkg: $(mod)
cd $(PWD)/packages \
&& create-react-native-module \
--platforms ios,android \
--prefix Berty$(shell echo "$(name)" | caser --pascal $(name)) \
--prefix Berty \
--package-identifier tech.berty.$(name) \
--license '$(license)' \
--use-cocoapods \
--github-account berty \
--author-name 'Berty Technologies' \
--author-email oss@berty.tech \
$(name)
cd $(PWD)/packages/react-native-$(name) \
&& rm -rf README.md \
&& $(json) -I -f package.json -e "this.name='@berty-tech/$(name)'" \
&& $(json) -I -f package.json -e "this.description=''"
&& $(json) -I -f package.json -e "this.description=''" \
&& $(json) -I -f package.json -e "this.author='$(author)'" \
&& $(json) -I -f package.json -e "this.licenseFilename=undefined" \
&& $(json) -I -f package.json -e "this.licenseFilename=undefined"
cd $(PWD)/packages/react-native-$(name) \
&& sed -i.bak 's/s.license = "MIT"/s.license = package["license"]/g' react-native-$(name).podspec \
&& rm react-native-$(name).podspec.bak
cd $(PWD)/packages/react-native-$(name)/ios/Berty$(pascal-name).xcodeproj \
&& sed -i.bak 's/ORGANIZATIONNAME = Facebook/ORGANIZATIONNAME = Berty Technologies/g' project.pbxproj \
&& rm project.pbxproj.bak

.PHONY: lint
lint: export PWD := $(PWD)
Expand Down
9 changes: 6 additions & 3 deletions js/babel.config.js
@@ -1,4 +1,7 @@
module.exports = (api) => ({
presets: ['@berty-tech/babel-preset'],
})
module.exports = (api) => {
api.cache(true)
return ({
presets: ['@berty-tech/babel-preset'],
})
}

21 changes: 11 additions & 10 deletions js/packages/berty-app/Makefile
Expand Up @@ -351,15 +351,15 @@ run.darwin: deps.darwin run


clean.ios: platform := ios
clean.ios: clean
clean.ios: export PWD := $(PWD)
clean.ios:
touch $(PWD)/ios/Podfile

clean.android: platform := android
clean.android: clean
clean.android:
clean.web: platform := web
clean.web: clean
clean.web:
clean.darwin: platform := darwin
clean.darwin: clean
clean.darwin:
clean:

.IGNORE \
Expand All @@ -371,16 +371,17 @@ clean:
fclean \

fclean.ios: platform := ios
fclean.ios: fclean
fclean.ios: export PWD := $(PWD)
fclean.ios:
cd $(PWD)/ios; \
rm -rf build; \
xcodebuild clean; \
rm -rf $(HOME)/Library/Developer/Xcode/DerivedData; \
rm -rf Pods; rm -rf ~/Library/Caches/CocoaPods
fclean.android: platform := android
fclean.android: fclean
fclean.android:
fclean.web: platform := web
fclean.web: fclean
fclean.web:
fclean.darwin: platform := darwin
fclean.darwin: fclean
fclean:
fclean.darwin:
fclean: fclean.ios fclean.android fclean.darwin fclean.web
2 changes: 1 addition & 1 deletion js/packages/berty-app/ios/Berty.xcodeproj/project.pbxproj
Expand Up @@ -327,7 +327,7 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0940;
ORGANIZATIONNAME = Facebook;
ORGANIZATIONNAME = Berty Technologies;
TargetAttributes = {
00E356ED1AD99517003FC87E = {
CreatedOnToolsVersion = 6.2;
Expand Down
7 changes: 0 additions & 7 deletions js/packages/berty-app/ios/Berty/AppDelegate.h
@@ -1,10 +1,3 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import <React/RCTBridgeDelegate.h>
#import <UIKit/UIKit.h>

Expand Down
7 changes: 0 additions & 7 deletions js/packages/berty-app/ios/Berty/AppDelegate.m
@@ -1,10 +1,3 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import "AppDelegate.h"

#import <React/RCTBridge.h>
Expand Down
7 changes: 0 additions & 7 deletions js/packages/berty-app/ios/Berty/main.m
@@ -1,10 +1,3 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import <UIKit/UIKit.h>

#import "AppDelegate.h"
Expand Down
7 changes: 0 additions & 7 deletions js/packages/berty-app/ios/BertyTests/BertyTests.m
@@ -1,10 +1,3 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

#import <UIKit/UIKit.h>
#import <XCTest/XCTest.h>

Expand Down
2 changes: 1 addition & 1 deletion js/packages/berty-app/ios/Config.xcconfig
Expand Up @@ -3,7 +3,7 @@
// Berty
//
// Created by Godefroy Ponsinet on 18/09/2019.
// Copyright © 2019 Facebook. All rights reserved.
// Copyright © 2019 Berty Technologies. All rights reserved.
//

// Configuration settings file format documentation can be found at:
Expand Down
Expand Up @@ -83,7 +83,7 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = Facebook;
ORGANIZATIONNAME = Berty Technologies;
TargetAttributes = {
58B511DA1A9E6C8500147676 = {
CreatedOnToolsVersion = 6.1.1;
Expand Down
5 changes: 2 additions & 3 deletions js/packages/react-native-core/react-native-core.podspec
Expand Up @@ -10,9 +10,8 @@ Pod::Spec.new do |s|
react-native-core
DESC
s.homepage = "https://github.com/github_account/react-native-core"
s.license = "MIT"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
s.authors = { "Berty Technologies" => "staff@berty-tech.tech" }
s.license = "(Apache-2.0 OR MIT)"
s.authors = { "Berty Technologies" => "oss@berty-tech.tech" }
s.platforms = { :ios => "9.0", :tvos => "10.0" }
s.source = { :git => "https://github.com/github_account/react-native-core.git", :tag => "#{s.version}" }

Expand Down
43 changes: 0 additions & 43 deletions js/packages/react-native-example/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions js/packages/react-native-example/android/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions js/packages/react-native-example/android/.project

This file was deleted.

This file was deleted.

6 changes: 3 additions & 3 deletions js/packages/react-native-example/index.js
@@ -1,5 +1,5 @@
import { NativeModules } from 'react-native'
import { NativeModules } from 'react-native';

const { BertyExample } = NativeModules
const { BertyExample } = NativeModules;

export default BertyExample
export default BertyExample;
Expand Up @@ -83,7 +83,7 @@
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = Facebook;
ORGANIZATIONNAME = Berty Technologies;
TargetAttributes = {
58B511DA1A9E6C8500147676 = {
CreatedOnToolsVersion = 6.1.1;
Expand Down

0 comments on commit bb62339

Please sign in to comment.