Skip to content

Commit

Permalink
Merge pull request #22724 from Expensify/Rory-FixCPResolveConflicts
Browse files Browse the repository at this point in the history
[No QA] Fix CP conflict resolution
  • Loading branch information
roryabraham authored Jul 12, 2023
2 parents 089cf7e + de52f1f commit 105ba31
Show file tree
Hide file tree
Showing 10 changed files with 5,008 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/actions/javascript/bumpVersion/bumpVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ function updateNativeVersions(version) {

let semanticVersionLevel = core.getInput('SEMVER_LEVEL', {require: true});
if (!semanticVersionLevel || !_.contains(versionUpdater.SEMANTIC_VERSION_LEVELS, semanticVersionLevel)) {
console.log(`Invalid input for 'SEMVER_LEVEL': ${semanticVersionLevel}`, `Defaulting to: ${versionUpdater.SEMANTIC_VERSION_LEVELS.BUILD}`);
semanticVersionLevel = versionUpdater.SEMANTIC_VERSION_LEVELS.BUILD;
console.log(`Invalid input for 'SEMVER_LEVEL': ${semanticVersionLevel}`, `Defaulting to: ${semanticVersionLevel}`);
}

const {version: previousVersion} = JSON.parse(fs.readFileSync('./package.json'));
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/bumpVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function updateNativeVersions(version) {

let semanticVersionLevel = core.getInput('SEMVER_LEVEL', {require: true});
if (!semanticVersionLevel || !_.contains(versionUpdater.SEMANTIC_VERSION_LEVELS, semanticVersionLevel)) {
console.log(`Invalid input for 'SEMVER_LEVEL': ${semanticVersionLevel}`, `Defaulting to: ${versionUpdater.SEMANTIC_VERSION_LEVELS.BUILD}`);
semanticVersionLevel = versionUpdater.SEMANTIC_VERSION_LEVELS.BUILD;
console.log(`Invalid input for 'SEMVER_LEVEL': ${semanticVersionLevel}`, `Defaulting to: ${semanticVersionLevel}`);
}

const {version: previousVersion} = JSON.parse(fs.readFileSync('./package.json'));
Expand Down
12 changes: 12 additions & 0 deletions .github/actions/javascript/getPreviousVersion/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: 'Get previous npm version'
description: 'Get the previous app version.'
inputs:
SEMVER_LEVEL:
description: Semantic Versioning Level
required: true
outputs:
PREVIOUS_VERSION:
description: The previous semver version of the application, according to the SEMVER_LEVEL provided
runs:
using: 'node16'
main: './index.js'
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const {readFileSync} = require('fs');
const core = require('@actions/core');
const _ = require('underscore');
const versionUpdater = require('../../../libs/versionUpdater');

const semverLevel = core.getInput('SEMVER_LEVEL', {require: true});
if (!semverLevel || !_.contains(versionUpdater.SEMANTIC_VERSION_LEVELS, semverLevel)) {
core.setFailed(`'Error: Invalid input for 'SEMVER_LEVEL': ${semverLevel}`);
}

const {version: currentVersion} = JSON.parse(readFileSync('./package.json'));
const previousVersion = versionUpdater.getPreviousVersion(currentVersion, semverLevel);
core.setOutput('PREVIOUS_VERSION', previousVersion);
Loading

0 comments on commit 105ba31

Please sign in to comment.