Skip to content

Commit

Permalink
Merge pull request flexn-io#529 from pavjacko/fix/flexn-io#528-sdk-fi…
Browse files Browse the repository at this point in the history
…led-merges

fix: correct sdk field merges
  • Loading branch information
pavjacko authored Jun 25, 2020
2 parents 9f605ba + d4b63a6 commit 9db9f87
Show file tree
Hide file tree
Showing 24 changed files with 180 additions and 102 deletions.
47 changes: 17 additions & 30 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ env:
- PROJECT_NAME=renative
jobs:
include:
- name: "HelloWorld iOS: E2E"
- name: "RNV Android: Integration"
dist: trusty
language: node_js
cache:
directories:
- node_modules
node_js: 13.13.0
os: osx
osx_image: xcode11.3
install: skip
script: ci/run_osx_ios.sh
install:
- rm -rf ~/.yarn/bin/yarn || true && npm uninstall --global yarn; npm install --global yarn; yarn --version
- yarn bootstrap
- cd packages/rnv
script: yarn test:integration
- name: "RNV Android: Build"
language: android
dist: trusty
Expand Down Expand Up @@ -61,31 +63,6 @@ jobs:
- yarn bootstrap
- cd packages/rnv
script: yarn test:ios
- name: "RNV Android: Integration"
language: android
dist: trusty
cache:
directories:
- node_modules
- $HOME/.gradle
sudo: required
jdk: oraclejdk8
android:
components:
- tools-26.1.1
- build-tools-28.0.3
- extra-google-m2repository
- extra-android-m2repository
- platform-tools-28.0.2
- android-28
- sys-img-x86-android-28
install:
- nvm install 13.13.0
- echo yes | sdkmanager "platforms;android-28"
- rm -rf ~/.yarn/bin/yarn || true && npm uninstall --global yarn; npm install --global yarn; yarn --version
- yarn bootstrap
- cd packages/rnv
script: yarn test:integration
- name: "RNV Node: Unit Tests"
dist: trusty
language: node_js
Expand All @@ -109,3 +86,13 @@ jobs:
- rm -rf ~/.yarn/bin/yarn || true && npm uninstall --global yarn; npm install --global yarn; yarn --version
- yarn bootstrap
script: yarn lint
- name: "HelloWorld iOS: E2E"
language: node_js
cache:
directories:
- node_modules
node_js: 13.13.0
os: osx
osx_image: xcode11.3
install: skip
script: ci/run_osx_ios.sh
43 changes: 40 additions & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,42 @@ sidebar_label: Changelog
---


## v0.30.2-alpha.2 (2020-6-24)

### Fixed

- further SDK merge fixes
- fix: #524 add default workspace to merge flow

### Added Features

- none

### Breaking Changes

- none


## v0.30.2-alpha.1 (2020-6-24)

### Fixed

- update loggigng
- fix: correct sdk field merges

### Added Features

- none

### Breaking Changes

- none


## v0.30.1 (2020-6-24)

### Fixed

- feat: better logging + suggestions for crypto issues
- feat: confirm folder replace during rnv new
- update rnv plugins
- fix: handle pugin add error in wrapper project
- Merge pull request #526 from pavjacko/feature/react-native-localize-plugin-update
Expand All @@ -28,12 +58,19 @@ sidebar_label: Changelog

### Added Features

- none
- feat: better logging + suggestions for crypto issues
- feat: confirm folder replace during rnv new

### Breaking Changes

- none

NOTE: Following plugins have been updated to newer versions:

- `react-native-webview`
- `react-native-prompt-android`
- `react-native-root-toast`
- `react-native-animatable`

## v0.30.0 (2020-6-23)

Expand Down
15 changes: 15 additions & 0 deletions docs/changelog/0.30.2-alpha.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## v0.30.2-alpha.1 (2020-6-24)

### Fixed

- update loggigng
- fix: correct sdk field merges

### Added Features

- none

### Breaking Changes

- none

15 changes: 15 additions & 0 deletions docs/changelog/0.30.2-alpha.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## v0.30.2-alpha.2 (2020-6-24)

### Fixed

- further SDK merge fixes
- fix: #524 add default workspace to merge flow

### Added Features

- none

### Breaking Changes

- none

2 changes: 1 addition & 1 deletion docs/plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -2672,7 +2672,7 @@ rnv plugin add react-web-vector-icons
## renative


Version: `0.30.1`
Version: `0.30.2-alpha.2`

Platforms: `ios`,`android`,`androidtv`,`androidwear`,`web`,`web-next`,`tizen`,`tizenmobile`,`tvos`,`webos`,`macos`,`windows`,`tizenwatch`,`kaios`,`firefoxos`,`firefoxtv`,`chromecast`

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "renative-wrapper-app",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "🚀🚀🚀 Build universal cross-platform apps with React Native. Includes latest `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `Tizen Mobile`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS`, `Firefox TV` and `Chromecast` platforms",
"keywords": [
"android tv",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "app",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "🚀🚀🚀 Build universal cross-platform apps with React Native. Includes latest `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `Tizen Mobile`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS` and `Firefox TV` platforms",
"homepage": "https://github.com/pavjacko/renative#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/renative-template-blank/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "renative-template-blank",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "🚧 Blank Template for ReNative (https://www.npmjs.com/package/renative). Supports `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS`, `Firefox TV`",
"keywords": [
"android tv",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
"buildSchemes": {
"debug": {
"runScheme": "Debug",
"bundleAssets": false,
"sdk": "iphonesimulator"
"bundleAssets": false
},
"test": {
"runScheme": "Debug",
Expand All @@ -76,7 +75,7 @@
"tvos": {
"entryFile": "index.tvos",
"teamID": "",
"provisioningStyle": "Manual",
"provisioningStyle": "Automatic",
"entitlements": {},
"permissions": ["*"],
"scheme": "RNVAppTVOS",
Expand All @@ -85,6 +84,11 @@
"runScheme": "Debug",
"bundleAssets": false
},
"test": {
"runScheme": "Debug",
"bundleAssets": true,
"sdk": "appletvsimulator"
},
"release": {
"scheme": "RNVAppTVOSRelease",
"runScheme": "Release",
Expand Down
2 changes: 1 addition & 1 deletion packages/renative-template-hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "renative-template-hello-world",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "🚧 Hello World Template for ReNative (https://www.npmjs.com/package/renative). Supports `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS`, `Firefox TV`",
"keywords": [
"android tv",
Expand Down
2 changes: 1 addition & 1 deletion packages/renative-template-kitchen-sink/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "renative-template-kitchen-sink",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "🚀🚀🚀 Build universal cross-platform apps with React Native. Includes latest `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS` and `Firefox TV` platforms",
"keywords": [
"android tv",
Expand Down
2 changes: 1 addition & 1 deletion packages/renative/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "renative",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "🚀🚀🚀 Build universal cross-platform apps with React Native. Includes latest `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS` and `Firefox TV` platforms",
"keywords": [
"android tv",
Expand Down
2 changes: 1 addition & 1 deletion packages/rnv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rnv",
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"description": "💻 CLI for ReNative (https://www.npmjs.com/package/renative). Supports `iOS`, `tvOS`, `Android`, `Android TV`, `Android Wear`, `Web`, `Tizen TV`, `Tizen Watch`, `LG webOS`, `macOS/OSX`, `Windows`, `KaiOS`, `FirefoxOS`, `Firefox TV`",
"keywords": [
"android tv",
Expand Down
2 changes: 1 addition & 1 deletion packages/rnv/pluginTemplates/renative.plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
},
"renative": {
"version": "0.30.1",
"version": "0.30.2-alpha.2",
"webpack": {
"modulePaths": [
"node_modules/renative"
Expand Down
20 changes: 2 additions & 18 deletions packages/rnv/src/configTools/configParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ export const generateBuildConfig = (c) => {
logDebug('generateBuildConfig');

const mergeOrder = [
c.paths.defaultWorkspace.config,
c.paths.rnv.projectTemplates.config,
c.paths.rnv.pluginTemplates.config,
// c.paths.rnv.platformTemplates.config,
Expand Down Expand Up @@ -418,6 +419,7 @@ export const generateBuildConfig = (c) => {
const extraPlugins = getEnginesPluginDelta(c);

const mergeFiles = [
c.files.defaultWorkspace.config,
c.files.rnv.projectTemplates.config,
{ plugins: extraPlugins },
...pluginTemplates,
Expand All @@ -441,24 +443,6 @@ export const generateBuildConfig = (c) => {
c.files.appConfig.configLocal
];

const mergeFolders = [
// platform templates
c.paths.rnv.platformTemplate.dir,
c.paths.project.projectConfig.buildsDir,
c.paths.workspace.project.projectConfig.buildsDir,
// ...c.paths.project.appConfigs.dirs,
c.paths.appConfig.buildsDir,
c.paths.workspace.appConfig.buildsDir
// PROJECT PLUGINS?
// PROJECT ASSETS?
// PROJECT FONTS?
// APP CONFIG PLUGINS?
// APP CONFIG ASSETS?
// APP CONFIG FONTS?
];

logDebug('mergeFolders:', mergeFolders);

const meta = [
{
_meta: {
Expand Down
8 changes: 4 additions & 4 deletions packages/rnv/src/platformTools/android/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,13 @@ export const configureAndroidProperties = (c, platform) => new Promise((resolve)

const appFolder = getAppFolder(c, platform);

const addNDK = c.files.workspace.config.sdks.ANDROID_NDK
&& !c.files.workspace.config.sdks.ANDROID_NDK.includes('<USER>');
const addNDK = c.buildConfig?.sdks?.ANDROID_NDK
&& !c.buildConfig.sdks.ANDROID_NDK.includes('<USER>');
const ndkString = `ndk.dir=${getRealPath(
c,
c.files.workspace.config.sdks.ANDROID_NDK
c.buildConfig?.sdks?.ANDROID_NDK
)}`;
let sdkDir = getRealPath(c, c.files.workspace.config.sdks.ANDROID_SDK);
let sdkDir = getRealPath(c, c.buildConfig?.sdks?.ANDROID_SDK);

if (isSystemWin) {
sdkDir = sdkDir.replace(/\\/g, '/');
Expand Down
24 changes: 17 additions & 7 deletions packages/rnv/src/platformTools/apple/provisionParser.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
/* eslint-disable import/no-cycle */
import { provision, cert } from 'ios-mobileprovision-finder';
import chalk from 'chalk';
import path from 'path';
import { getConfigProp } from '../../common';
import { logWarning } from '../../systemTools/logger';


export const parseProvisioningProfiles = async (c) => {
// PROJECT
const teamID = getConfigProp(c, c.platform, 'teamID');
const id = getConfigProp(c, c.platform, 'id');
const certificates = cert.read();
const provisionProfiles = provision.read();
const result = provision.select(provisionProfiles, {
AppId: id,
TeamIdentifier: teamID,
Certificates: certificates.valid
});
return result;
try {
const provisionProfiles = provision.read();
const result = provision.select(provisionProfiles, {
AppId: id,
TeamIdentifier: teamID,
Certificates: certificates.valid
});
return result;
} catch (e) {
logWarning(`You have no provisioning files available. Check your ${chalk.white(path.join(c.paths.home.dir, 'Library/MobileDevice/Provisioning Profiles'))} folder`);
}

return null;
};
21 changes: 12 additions & 9 deletions packages/rnv/src/platformTools/apple/xcodeParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,19 @@ export const parseXcodeProject = async (c, platform) => {

let eligibleProfile;

result.eligable.forEach((v) => {
const bundleId = v.Entitlements['application-identifier'];
if (result?.eligable) {
result.eligable.forEach((v) => {
const bundleId = v.Entitlements['application-identifier'];

if (
bundleId
=== `${c.runtime.xcodeProj.teamID}.${c.runtime.xcodeProj.id}`
) {
eligibleProfile = v;
}
});
}

if (
bundleId
=== `${c.runtime.xcodeProj.teamID}.${c.runtime.xcodeProj.id}`
) {
eligibleProfile = v;
}
});

if (eligibleProfile) {
const { autoFix } = await inquirerPrompt({
Expand Down
Loading

0 comments on commit 9db9f87

Please sign in to comment.