Skip to content

Commit

Permalink
chore: Clean-up in therms of code and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gcarreno committed Apr 10, 2020
1 parent 0437690 commit 401ced1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ At the moment this action only supports:
```yaml
steps:
- uses: actions/checkout@v2
- uses: gcarreno/setup-lazarus@v1
- uses: gcarreno/setup-lazarus@v2.1
with:
lazarus-version: 'dist'
- run: lazbuild YourTestProject.lpi
Expand Down Expand Up @@ -80,9 +80,9 @@ jobs:
operating-system: [ubuntu-18.04,ubuntu-latest]
lazarus-versions: [dist, 2.0.6]
steps:
- uses: actions/checkout@v2.0.3
- uses: actions/checkout@v2
- name: Install Lazarus
uses: gcarreno/setup-lazarus@v1.0.34
uses: gcarreno/setup-lazarus@v2.1
with:
lazarus-version: ${{ matrix.lazarus-versions }}
- name: Build the test app
Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4610,12 +4610,10 @@ function getPackageName(platform, lazarusVersion, pkg) {
switch (platform) {
case "win32":
result = `https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%20${lazarusVersion}/`;
//eval(`result += pkgs.${platform}.v${lazVer};`);
result += pkgs[platform][lazVer];
break;
case "linux":
result = `https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%20${lazarusVersion}/`;
//eval(`result += pkgs.${platform}.v${lazVer}.${pkg};`);
result += pkgs[platform][lazVer][pkg];
break;
default:
Expand Down Expand Up @@ -4716,7 +4714,9 @@ function getLazarus(version) {
let platform = os.platform();
switch (platform) {
case 'linux':
// Perform a repository update
yield exec_1.exec('sudo apt update');
// Install Lazarus from the Ubuntu repository
yield exec_1.exec('sudo apt install -y lazarus');
break;
case 'win32':
Expand Down Expand Up @@ -4831,7 +4831,7 @@ function _downloadLazarus(versionLaz) {
break;
case 'linux':
console.log('_downloadLazarus - sudo section');
// Perform an repository update
// Perform a repository update
yield exec_1.exec('sudo apt update');
// Install the pre-requesite needed for Lazarus
// TODO : investigate when this should be GTK 5
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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": "2.0.3",
"version": "2.1.0",
"description": "Set up your GitHub Actions workflow with a specific version of Lazarus",
"main": "lib/setup-lazarus.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export async function getLazarus(
let platform = os.platform();
switch (platform) {
case 'linux':
// Perform a repository update
await exec('sudo apt update');
// Install Lazarus from the Ubuntu repository
await exec('sudo apt install -y lazarus');
break;
case 'win32':
Expand Down Expand Up @@ -147,7 +149,7 @@ async function _downloadLazarus(
break;
case 'linux':
console.log('_downloadLazarus - sudo section');
// Perform an repository update
// Perform a repository update
await exec('sudo apt update');
// Install the pre-requesite needed for Lazarus
// TODO : investigate when this should be GTK 5
Expand Down
2 changes: 0 additions & 2 deletions src/packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,10 @@ export function getPackageName(
switch (platform) {
case "win32":
result = `https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%20${lazarusVersion}/`;
//eval(`result += pkgs.${platform}.v${lazVer};`);
result += pkgs[platform][lazVer];
break;
case "linux":
result = `https://sourceforge.net/projects/lazarus/files/Lazarus%20Linux%20amd64%20DEB/Lazarus%20${lazarusVersion}/`;
//eval(`result += pkgs.${platform}.v${lazVer}.${pkg};`);
result += pkgs[platform][lazVer][pkg];
break;
default:
Expand Down

0 comments on commit 401ced1

Please sign in to comment.