Skip to content

Commit

Permalink
Merge pull request #70 from shoutem/release/2.4.2
Browse files Browse the repository at this point in the history
Release/2.4.2
  • Loading branch information
majaklajic authored Oct 7, 2020
2 parents 814b936 + afef1cd commit f3b36c6
Show file tree
Hide file tree
Showing 10 changed files with 1,592 additions and 30 deletions.
4 changes: 0 additions & 4 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ android.enableJetifier=true
# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.37.0

# Disable D8 desugaring until fully supported
# https://stackoverflow.com/a/53163195/7920643
android.enableD8.desugaring=false

#NativeModuleInjectionMark-gradle-properties

#keystore settings
Expand Down
2 changes: 1 addition & 1 deletion ios/ShoutemApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>com.shoutem.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>com.shoutem.ShoutemApp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
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": "@shoutem/platform",
"version": "2.4.1",
"version": "2.4.2",
"scripts": {
"android": "react-native run-android",
"build": "node scripts/build",
Expand Down
2 changes: 1 addition & 1 deletion package.template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shoutem/platform",
"version": "2.4.1",
"version": "2.4.2",
"scripts": {
"android": "react-native run-android",
"build": "node scripts/build",
Expand Down
42 changes: 22 additions & 20 deletions platform/platform.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"version": "2.4.1",
"mobileAppVersion": "2.4.1",
"releaseNotes": "* SendBird Chat extension\n* Advertising extension\n* Bugfixes and stability improvements",
"version": "2.4.2",
"mobileAppVersion": "2.4.2",
"releaseNotes": "* Added helper scripts for build information\n* Enabled D8 desugaring\n* Improvements in APNS / FCM token generation through shoutem.firebase\n* Compatibility adjustments for push notification handling in iOS14\n* Bugfixes and stability improvements",
"settings": {
"DEV-appetizeKey": "hqw5pehpfzvwjr3n69mv1942a0",
"QA-appetizeKey": "qku0mhvyew991yjzkyv3g2rpyr",
"Production-appetizeKey": "1bqu3xxrq1k7yazztuahav9aqr"
"DEV-appetizeKey": "bqy0g72f2499r301a3yw3630aw",
"QA-appetizeKey": "8zcpu9fguue48erh4zw0pbuqhc",
"Production-appetizeKey": "ydwf2v5k6erk5qrd80ve1twg6r"
},
"builds": {
"live": {
Expand All @@ -23,17 +23,17 @@
"dependencies": {
"shoutem.about": "~2.4.0",
"shoutem.analytics": "~2.4.0",
"shoutem.application": "~2.4.0",
"shoutem.application": "~2.4.2",
"shoutem.audio": "~2.4.1",
"shoutem.auth": "~2.4.0",
"shoutem.auth": "~2.4.2",
"shoutem.books": "~2.4.0",
"shoutem.camera": "~2.4.0",
"shoutem.cms": "~2.4.0",
"shoutem.cms": "~2.4.1",
"shoutem.code-push": "~2.4.0",
"shoutem.deals": "~2.4.0",
"shoutem.events": "~2.4.0",
"shoutem.favorites": "~2.4.0",
"shoutem.firebase": "~2.4.0",
"shoutem.firebase": "~2.4.2",
"shoutem.flurry-analytics": "~2.4.0",
"shoutem.i18n": "~2.4.0",
"shoutem.ical-events": "~2.4.0",
Expand All @@ -42,31 +42,33 @@
"shoutem.menu": "~2.4.0",
"shoutem.navigation": "~2.4.1",
"shoutem.news": "~2.4.0",
"shoutem.notification-center": "~2.4.0",
"shoutem.notification-center": "~2.4.1",
"shoutem.page": "~2.4.0",
"shoutem.people": "~2.4.0",
"shoutem.persist": "~2.4.0",
"shoutem.photos": "~2.4.0",
"shoutem.places": "~2.4.0",
"shoutem.podcast": "~2.4.1",
"shoutem.podcast": "~2.4.2",
"shoutem.preview": "~2.4.1",
"shoutem.products": "~2.4.0",
"shoutem.push-notifications": "~2.4.0",
"shoutem.push-notifications": "~2.4.2",
"shoutem.radio": "~2.4.0",
"shoutem.redux": "~2.4.0",
"shoutem.rss": "~2.4.1",
"shoutem.rss-news": "~2.4.0",
"shoutem.rss-photos": "~2.4.0",
"shoutem.rss-videos": "~2.4.0",
"shoutem.rubicon-theme": "~2.4.0",
"shoutem.rss": "~2.4.3",
"shoutem.rss-monitoring": "~2.4.2",
"shoutem.rss-news": "~2.4.2",
"shoutem.rss-photos": "~2.4.1",
"shoutem.rss-videos": "~2.4.1",
"shoutem.rubicon-theme": "~2.4.2",
"shoutem.sendbird": "~2.4.3",
"shoutem.shopify": "~2.4.0",
"shoutem.social": "~2.4.0",
"shoutem.sub-navigation": "~2.4.0",
"shoutem.theme": "~2.4.0",
"shoutem.theme": "~2.4.1",
"shoutem.video": "~2.4.0",
"shoutem.vimeo": "~2.4.0",
"shoutem.web-view": "~2.4.0",
"shoutem.wordpress": "~2.4.0",
"shoutem.wordpress": "~2.4.1",
"shoutem.youtube": "~2.4.0"
}
}
40 changes: 40 additions & 0 deletions scripts/helpers/fetch-publishing-properties.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const request = require('request');
const getErrorMessageFromResponse = require('../helpers/get-error-message-from-response');

async function fetchPublishingProperties(config) {
const {
appId,
authorization,
legacyApiEndpoint: legacyApiHost = undefined,
} = config;

if (!legacyApiHost) {
process.exitCode = 1;
throw new Error('legacyApiEndpoint is not set in build config.');
}

const legacyApiPath = `/api/applications/publishing_properties.json?nid=${appId}`;

const requestArgs = {
url: `http://${legacyApiHost}${legacyApiPath}`,
headers: {
Authorization: `Bearer ${authorization}`,
},
};

return new Promise((resolve, reject) => {
request.get(requestArgs, (err, response, body) => {
if (response.statusCode === 200) {
const publishingProperties = JSON.parse(body);
resolve(publishingProperties);
} else {
const errorMessage = getErrorMessageFromResponse(response);
reject(`Publishing properties download failed with error: ${response.statusCode} ${errorMessage}`.bold.red);
}
}).on('error', err => {
reject(err);
});
});
}

module.exports = fetchPublishingProperties;
39 changes: 39 additions & 0 deletions scripts/helpers/get-production-build-info.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const request = require('request-promise');
const _ = require('lodash');

function getBuildUrl(buildConfig) {
const { serverApiEndpoint, appId } = buildConfig;

const path = 'configurations/current/builds';

return `http://prod.${serverApiEndpoint}/v1/apps/${appId}/${path}`;
}

async function getProductionBuildInfo(buildConfig, platform) {
const configurationUrl = getBuildUrl(buildConfig);

const requestOptions = {
url: configurationUrl,
headers: {
Accept: 'application/vnd.api+json',
Authorization: `Bearer ${buildConfig.authorization}`,
},
};

try {
const body = await request.get(requestOptions);
const parsedBody = JSON.parse(body);
const productionBuild = _.find(
parsedBody.data,
build => build.attributes.devicePlatform === platform,
);

return productionBuild;
} catch (error) {
console.error('Could not get production build info.', error);
}

return false;
}

module.exports = getProductionBuildInfo;
8 changes: 5 additions & 3 deletions scripts/helpers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const constants = require('./const');

module.exports = {
findFileOnPath: require('./find-file-on-path'),
reactNativeLink: require('./react-native-link'),
forceLinkXCodeProject: require('./force-link-xcode-project'),
fetchPublishingProperties: require('./fetch-publishing-properties'),
getAppDelegateHeaderPath: require('./get-app-delegate-header-path'),
getAppDelegatePath: require('./get-app-delegate-path'),
getAppEntitlementsPath: require('./get-app-entitlements-path'),
Expand All @@ -19,9 +19,8 @@ module.exports = {
getAppConfiguration: require('./get-app-configuration'),
getBuildConfiguration: require('./get-build-configuration'),
getInfoPlistPath: require('./get-info-plist-path'),
projectPath: require('./get-project-path'),
isWindows: require('./is-windows'),
getPodfileTemplatePath: require('./get-podfile-template-path'),
getProductionBuildInfo: require('./get-production-build-info'),
getMainActivityPath: require('./get-main-activity-path'),
getMainApplicationPath: require('./get-main-application-path'),
getAppGradlePath: require('./get-app-gradle-path'),
Expand All @@ -31,6 +30,9 @@ module.exports = {
getRootGradlePath: require('./get-root-gradle-path'),
getAndroidManifestPath: require('./get-android-manifest-path'),
getFlipperJavaPath: require('./get-flipper-java-path'),
isWindows: require('./is-windows'),
projectPath: require('./get-project-path'),
reactNativeLink: require('./react-native-link'),
updateAndroidPackageName: require('./update-android-package-name'),
inject: require('./inject'),
replace: require('./replace'),
Expand Down
Loading

0 comments on commit f3b36c6

Please sign in to comment.