Skip to content

Commit

Permalink
fix: Trying a diff kind of string concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarreno committed May 21, 2023
1 parent a2961e7 commit 52db240
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
18 changes: 9 additions & 9 deletions dist/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1073,47 +1073,47 @@ class Packages {
// Clean up, no need for the file to lay around any more
yield (0, exec_1.exec)(`rm ${pkgFile}`);
for (const fpkg of pkg.Packages) {
const pkgLPKFile = path.join(pkgFolder, pkg.PackageBaseDir.replace(/ /gi, '\ '), fpkg.RelativeFilePath.replace(/ /gi, '\ '), fpkg.PackageFile.replace(/ /gi, '\ '));
const pkgLPKFile = path.join(pkgFolder, pkg.PackageBaseDir, fpkg.RelativeFilePath, fpkg.PackageFile);
switch (fpkg.PackageType) {
case 0:
case 1:
// Making Lazarus aware of the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild --add-package "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild --add-package "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild --add-package "' + pkgLPKFile + '"');
}
else {
core.info(`installPackages -- executing lazbuild --ws=cocoa --add-package "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild --ws=cocoa --add-package "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild --ws=cocoa --add-package "' + pkgLPKFile + '"');
}
// Compiling the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild "' + pkgLPKFile + '"');
}
else {
core.info(`installPackages -- executing lazbuild --ws=cocoa "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild --ws=cocoa "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild --ws=cocoa "' + pkgLPKFile + '"');
}
break;
case 2:
// Making Lazarus aware of the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild --add-package-link "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild --add-package-link "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild --add-package-link "' + pkgLPKFile + '"');
}
else {
core.info(`installPackages -- executing lazbuild --ws=cocoa --add-package-link "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild --ws=cocoa --add-package-link "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild --ws=cocoa --add-package-link "' + pkgLPKFile + '"');
}
// Compiling the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild "' + pkgLPKFile + '"');
}
else {
core.info(`installPackages -- executing lazbuild --ws=cocoa "${pkgLPKFile}"`);
yield (0, exec_1.exec)(`lazbuild --ws=cocoa "${pkgLPKFile}"`);
yield (0, exec_1.exec)('lazbuild --ws=cocoa "' + pkgLPKFile + '"');
}
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "setup-lazarus",
"version": "3.2.11",
"version": "3.2.12",
"description": "Set up your GitHub Actions workflow with a specific version of Lazarus",
"main": "lib/main.js",
"scripts": {
Expand Down
22 changes: 11 additions & 11 deletions src/Packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ export class Packages {

const pkgLPKFile = path.join(
pkgFolder,
pkg.PackageBaseDir.replace(/ /gi, '\ '),
fpkg.RelativeFilePath.replace(/ /gi, '\ '),
fpkg.PackageFile.replace(/ /gi, '\ ')
pkg.PackageBaseDir,
fpkg.RelativeFilePath,
fpkg.PackageFile
);

switch (fpkg.PackageType) {
Expand All @@ -79,37 +79,37 @@ export class Packages {
// Making Lazarus aware of the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild --add-package "${pkgLPKFile}"`);
await exec(`lazbuild --add-package "${pkgLPKFile}"`);
await exec('lazbuild --add-package "' + pkgLPKFile + '"');
} else {
core.info(`installPackages -- executing lazbuild --ws=cocoa --add-package "${pkgLPKFile}"`);
await exec(`lazbuild --ws=cocoa --add-package "${pkgLPKFile}"`);
await exec('lazbuild --ws=cocoa --add-package "' + pkgLPKFile + '"');
}

// Compiling the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild "${pkgLPKFile}"`);
await exec(`lazbuild "${pkgLPKFile}"`);
await exec('lazbuild "' + pkgLPKFile + '"');
} else {
core.info(`installPackages -- executing lazbuild --ws=cocoa "${pkgLPKFile}"`);
await exec(`lazbuild --ws=cocoa "${pkgLPKFile}"`);
await exec('lazbuild --ws=cocoa "' + pkgLPKFile + '"');
}
break;
case 2:
// Making Lazarus aware of the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild --add-package-link "${pkgLPKFile}"`);
await exec(`lazbuild --add-package-link "${pkgLPKFile}"`);
await exec('lazbuild --add-package-link "' + pkgLPKFile + '"');
} else {
core.info(`installPackages -- executing lazbuild --ws=cocoa --add-package-link "${pkgLPKFile}"`);
await exec(`lazbuild --ws=cocoa --add-package-link "${pkgLPKFile}"`);
await exec('lazbuild --ws=cocoa --add-package-link "' + pkgLPKFile + '"');
}
// Compiling the package
if (this._Platform != 'darwin') {
core.info(`installPackages -- executing lazbuild "${pkgLPKFile}"`);
await exec(`lazbuild "${pkgLPKFile}"`);
await exec('lazbuild "' + pkgLPKFile + '"');
} else {
core.info(`installPackages -- executing lazbuild --ws=cocoa "${pkgLPKFile}"`);
await exec(`lazbuild --ws=cocoa "${pkgLPKFile}"`);
await exec('lazbuild --ws=cocoa "' + pkgLPKFile + '"');
}
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const _version = "3.2.11";
export const _version = "3.2.12";

0 comments on commit 52db240

Please sign in to comment.