Skip to content

Commit

Permalink
refactor: platform version logic (apache#1206)
Browse files Browse the repository at this point in the history
* refactor: pull platform version from package.json
* chore: remove old VERSION file and logic
  • Loading branch information
erisu authored and gazben committed Aug 26, 2022
1 parent d9c3df5 commit e49a753
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 13 deletions.
1 change: 0 additions & 1 deletion Cordova.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Pod::Spec.new do |s|
s.platform = :ios, "11.0"
s.source = relSource
s.requires_arc = true
s.preserve_paths = 'CordovaLib/VERSION'
s.frameworks = 'Foundation'
s.source_files = 'CordovaLib/**/*.{h,m}'
s.public_header_files = 'CordovaLib/include/**/*.h'
Expand Down
1 change: 0 additions & 1 deletion CordovaLib/VERSION

This file was deleted.

4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ let package = Package(
.target(
name: "Cordova",
path: "CordovaLib/",
exclude: ["VERSION", "cordova.js", "Cordova/Cordova.h", "Cordova/Info.plist"],
exclude: ["cordova.js", "Cordova/Cordova.h", "Cordova/Info.plist"],
cSettings: [
.headerSearchPath("Classes/Private")
.headerSearchPath("Classes/Private")
]
)
]
Expand Down
9 changes: 1 addition & 8 deletions lib/Api.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@

/* jslint node: true */

/**
* @todo update coho to update this line.
* @todo use `package.json` instead but first
* figure out how this fit in with the platform-centered workflow structure.
* This workflow would not have the `package.json` file.
*/
// Coho updates this line
const VERSION = '7.0.0-dev';
const VERSION = require('../package.json').version;

const fs = require('fs-extra');
const path = require('path');
Expand Down
2 changes: 1 addition & 1 deletion lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class ProjectCreator {
// like it should).
fs.symlinkSync(cordovaLibPathSrc, cordovaLibPathDest);
} else {
for (const p of ['include', 'Classes', 'VERSION', 'CordovaLib.xcodeproj/project.pbxproj']) {
for (const p of ['include', 'Classes', 'CordovaLib.xcodeproj/project.pbxproj']) {
fs.copySync(path.join(cordovaLibPathSrc, p), path.join(cordovaLibPathDest, p));
}
}
Expand Down

0 comments on commit e49a753

Please sign in to comment.