Skip to content

Commit

Permalink
remove debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Lobanov committed Sep 24, 2020
1 parent 175eae9 commit d83d540
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
9 changes: 4 additions & 5 deletions dist/index.js
Expand Up @@ -38,7 +38,6 @@ const run = () => {
const versionSpec = core.getInput("xcode-version", { required: false });
core.info(`Switching Xcode to version '${versionSpec}'...`);
const selector = new xcode_selector_1.XcodeSelector();
console.log(JSON.stringify(selector.getAllVersions(), null, 2));
const targetVersion = selector.findVersion(versionSpec);
if (!targetVersion) {
throw new Error([
Expand Down Expand Up @@ -187,15 +186,15 @@ exports.getXcodeReleaseType = (xcodeRootPath) => {
const licenseInfoPlistPath = path.join(xcodeRootPath, "Contents", "Resources", "LicenseInfo.plist");
if (!fs.existsSync(licenseInfoPlistPath)) {
// Every Xcode should contain license plist but it can be changed in future
core.warning("Unable to determine Xcode version type based on license plist");
core.warning(`Xcode License plist doesn't on exist on path '${licenseInfoPlistPath}'`);
core.debug("Unable to determine Xcode version type based on license plist");
core.debug(`Xcode License plist doesn't on exist on path '${licenseInfoPlistPath}'`);
return XcodeReleaseType.Unknown;
}
const licenseInfoRawContent = fs.readFileSync(licenseInfoPlistPath, "utf8");
const licenseInfo = plist.parse(licenseInfoRawContent);
if (!licenseInfo.licenseType) {
core.warning("Unable to determine Xcode version type based on license plist");
core.warning("Xcode License plist doesn't contain 'licenseType' property");
core.debug("Unable to determine Xcode version type based on license plist");
core.debug("Xcode License plist doesn't contain 'licenseType' property");
return XcodeReleaseType.Unknown;
}
const licenseType = licenseInfo.licenseType.toString().toLowerCase();
Expand Down
2 changes: 0 additions & 2 deletions src/setup-xcode.ts
Expand Up @@ -12,8 +12,6 @@ const run = (): void => {
core.info(`Switching Xcode to version '${versionSpec}'...`);

const selector = new XcodeSelector();

console.log(JSON.stringify(selector.getAllVersions(), null, 2));
const targetVersion = selector.findVersion(versionSpec);

if (!targetVersion) {
Expand Down
8 changes: 4 additions & 4 deletions src/xcode-utils.ts
Expand Up @@ -13,16 +13,16 @@ export const getXcodeReleaseType = (xcodeRootPath: string): XcodeReleaseType =>
const licenseInfoPlistPath = path.join(xcodeRootPath, "Contents", "Resources", "LicenseInfo.plist");
if (!fs.existsSync(licenseInfoPlistPath)) {
// Every Xcode should contain license plist but it can be changed in future
core.warning("Unable to determine Xcode version type based on license plist");
core.warning(`Xcode License plist doesn't on exist on path '${licenseInfoPlistPath}'`);
core.debug("Unable to determine Xcode version type based on license plist");
core.debug(`Xcode License plist doesn't on exist on path '${licenseInfoPlistPath}'`);
return XcodeReleaseType.Unknown;
}

const licenseInfoRawContent = fs.readFileSync(licenseInfoPlistPath, "utf8");
const licenseInfo = plist.parse(licenseInfoRawContent) as plist.PlistObject;
if (!licenseInfo.licenseType) {
core.warning("Unable to determine Xcode version type based on license plist");
core.warning("Xcode License plist doesn't contain 'licenseType' property");
core.debug("Unable to determine Xcode version type based on license plist");
core.debug("Xcode License plist doesn't contain 'licenseType' property");
return XcodeReleaseType.Unknown;
}

Expand Down

0 comments on commit d83d540

Please sign in to comment.