Skip to content

Commit

Permalink
Merge branch 'main' of github-personal:akshayasalvi/App into validati…
Browse files Browse the repository at this point in the history
…on-code-expiry

# Conflicts:
#	src/components/WelcomeText.js
#	src/pages/signin/SignInPage.js
  • Loading branch information
akshayasalvi committed Dec 23, 2021
2 parents 0bfaf85 + fbb4674 commit 361f097
Show file tree
Hide file tree
Showing 259 changed files with 5,491 additions and 2,129 deletions.
8 changes: 8 additions & 0 deletions .github/actions/checkBundleVersionStringMatch/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: 'Check if Bundle Versions Match'
description: "Check if the CFBundleVersion string is compatible with the CFBundleShortVersionString"
outputs:
BUNDLE_VERSIONS_MATCH:
description: Whether or not the bundle versions match
runs:
using: 'node12'
main: './index.js'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const core = require('@actions/core');
const {execSync} = require('child_process');
const {PLIST_PATH} = require('../../libs/nativeVersionUpdater');

const bundleVersion = execSync(`grep -A1 'CFBundleVersion' ${PLIST_PATH} | grep -v 'CFBundleVersion' | sed 's|[</string>,]||g'`).toString().trim();
const shortBundleVersion = execSync(`grep -A1 'CFBundleShortVersionString' ${PLIST_PATH} | grep -v 'CFBundleShortVersionString' | sed 's|[</string>,]||g'`).toString().trim();

console.log(`Bundle Version: ${bundleVersion}`);
console.log(`Short Bundle Version: ${shortBundleVersion}`);

const hasValue = shortBundleVersion && bundleVersion;
if (!hasValue) {
console.log('Failed to get Bundle Versions from plist');
core.setOutput('BUNDLE_VERSIONS_MATCH', false);
} else if (bundleVersion.includes(shortBundleVersion)) {
console.log('Bundle Versions are compatible');
core.setOutput('BUNDLE_VERSIONS_MATCH', true);
} else {
console.log('Bundle Versions are not compatible');
core.setOutput('BUNDLE_VERSIONS_MATCH', false);
}
Loading

0 comments on commit 361f097

Please sign in to comment.