Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/actions/sdk/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ export class SdkPublishAction {
): Promise<ActionResult<PublishingInfo>> => {
return await withDirPath(async (tempDirectory) => {
const packageConfiguration = publishingProfile.getPackageConfigurationForLanguage(language);
let packageSettingsDirectory: DirectoryPath | undefined;

if (packageConfiguration !== null && packageConfiguration.isEnabled) {
const packageSettingsConfiguration = PackageSettingsConfiguration.create(language, packageConfiguration);
const packageSettingsDirectory = tempDirectory.join('package-settings');
packageSettingsDirectory = tempDirectory.join('package-settings');
const packageSettingsContext = new PackageSettingsContext(packageSettingsDirectory);
await packageSettingsContext.writeConfiguration(packageSettingsConfiguration, language);
}
Expand All @@ -57,7 +59,7 @@ export class SdkPublishAction {
false,
undefined,
semVersion,
tempDirectory
packageSettingsDirectory
);
if (sdkGenerationResult.isFailed()) {
return ActionResult.failed();
Expand Down
2 changes: 1 addition & 1 deletion src/infrastructure/env-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class EnvInfo {
const envBaseUrls = process.env.APIMATIC_BASE_URL;
if (envBaseUrls) {
const baseUrls = envBaseUrls.split(';');
EnvInfo.cachedAuthBaseUrl = baseUrls.length === 2 ? baseUrls[1] : undefined;
EnvInfo.cachedAuthBaseUrl = baseUrls.length === 3 ? baseUrls[1] : undefined;
}
return EnvInfo.cachedAuthBaseUrl;
}
Expand Down
2 changes: 1 addition & 1 deletion src/types/build-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class BuildContext {
const tempBuildDir = tempDir.join("build");
await this.fileService.copyDirectoryContents(this.buildDirectory, tempBuildDir);
if (packageSettingsDirectory) {
await this.fileService.copyDirectoryContents(packageSettingsDirectory.join('package-settings'), tempBuildDir.join('package-settings'));
await this.fileService.copyDirectoryContents(packageSettingsDirectory, tempBuildDir.join('package-settings'));
}
return await tempContext.zip(tempBuildDir);
}
Expand Down