Skip to content

Commit

Permalink
Simplified Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 1, 2024
1 parent d3ab6a2 commit 45485a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04, macos-14, macos-13, macos-12]
postgres-version: [16, 15, 14, 13, 12]
include:
- os: windows-2022
postgres-version: 14
- os: windows-2019
postgres-version: 14
os: [macos-14, macos-12]
postgres-version: [16, 14]
steps:
- uses: actions/checkout@v4
- uses: ./.
Expand Down
9 changes: 2 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,12 @@ if (isMac()) {
bin = `${prefix}/opt/postgresql@${postgresVersion}/bin`;
let dataDir = `${prefix}/var/postgresql@${postgresVersion}`;

if (postgresVersion != 14 || process.env['ImageOS'] == 'macos13' || process.env['ImageOS'] == 'macos14') {
if (process.env['ImageOS'] != 'macos13' && process.env['ImageOS'] != 'macos14') {
if (!fs.existsSync(bin)) {
if (fs.existsSync(`${prefix}/opt/postgresql@14`)) {
// remove previous version
run(`brew unlink postgresql@14`);
}

// update Homebrew if needed
if (process.env['ImageOS'] == 'macos1015' && postgresVersion == 15) {
run(`brew update`);
}

// install new version
run(`brew install postgresql@${postgresVersion}`);
}
Expand Down

0 comments on commit 45485a1

Please sign in to comment.