Skip to content

Commit 1ed3ec3

Browse files
avandrasavandras
andauthored
[+] switch to psycopg3 instead of the binary (#91)
* Use plain psycopg instead of binary * Do not create the GUI installer anymore * Simplify and modernize releasing --------- Co-authored-by: avandras <andras.vaczi@cybertec.at>
1 parent a40d89b commit 1ed3ec3

File tree

4 files changed

+8
-46
lines changed

4 files changed

+8
-46
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,14 @@ jobs:
1717
- name: Checkout code
1818
uses: actions/checkout@v4
1919

20-
- name: Build project # This would actually build your project, using zip for an example artifact
20+
- name: Build project
2121
shell: pwsh
2222
run: |
2323
.\make.ps1
2424
25-
- name: Create Release
26-
id: create_release
27-
uses: actions/create-release@v1
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
- name: Release Artifacts
26+
uses: softprops/action-gh-release@v2
3027
with:
31-
tag_name: ${{ github.ref }}
32-
release_name: Release ${{ github.ref }}
33-
draft: false
34-
prerelease: false
35-
36-
- name: Upload Release Asset (zip)
37-
id: upload-release-asset-zip
38-
uses: actions/upload-release-asset@v1
39-
env:
40-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41-
with:
42-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
43-
asset_path: ./PES.zip
44-
asset_name: PES.zip
45-
asset_content_type: application/zip
46-
47-
- name: Upload Release Asset (exe)
48-
id: upload-release-asset-exe
49-
uses: actions/upload-release-asset@v1
50-
env:
51-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52-
with:
53-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
54-
asset_path: ./Patroni-Env-Setup.exe
55-
asset_name: Patroni-Env-Setup.exe
56-
asset_content_type: application/vnd.microsoft.portable-executable
28+
files: |
29+
*.zip
30+
*.tar.gz

env.ps1

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,3 @@ $PYTHON_REF = "https://www.python.org/ftp/python/3.13.2/python-3.13.2-amd64.exe"
1111

1212
$SEVENZIP = "C:\Program Files\7-Zip\7z.exe"
1313

14-
$INNOTOOL = "C:\Program Files (x86)\Inno Setup 6"
15-
$ISCC = Join-Path $INNOTOOL "iscc.exe"
16-
$ISSFile = "installer\patroni.iss"

make.ps1

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function Get-PatroniPackages {
102102
Write-Host "`n--- Download PATRONI packages ---" -ForegroundColor blue
103103
Set-Location "$MD\patroni"
104104
& $PIP download -r requirements.txt -d .patroni-packages
105-
& $PIP download pip pip_install setuptools wheel cdiff psycopg-binary -d .patroni-packages
105+
& $PIP download pip pip_install setuptools wheel cdiff psycopg -d .patroni-packages
106106
Set-Location -Path "..\.."
107107
Write-Host "`n--- PATRONI packages downloaded ---" -ForegroundColor green
108108
}
@@ -119,15 +119,6 @@ function Get-WinSW {
119119
}
120120

121121
function Export-Assets {
122-
Write-Host "`n--- Creating windows installer ---" -ForegroundColor blue
123-
if (-Not (Test-Path $INNOTOOL)) {
124-
Write-Host "$INNOTOOL does not exist" -ForegroundColor Red
125-
Write-Host "Please install Innotool and set the INNOTOOL environment variable." -ForegroundColor Red
126-
exit 1
127-
}
128-
& $ISCC $ISSFile
129-
Write-Host "`n--- Installer generated successfully ---" -ForegroundColor green
130-
131122
Write-Host "`n--- Prepare archive ---" -ForegroundColor blue
132123
Compress-ToZipFile "$MD" "$MD.zip"
133124
Write-Host "`n--- Archive compressed ---" -ForegroundColor green

src/install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Write-Host "--- Python runtime installed ---`n" -ForegroundColor green
2121

2222
Write-Host "--- Installing Patroni packages ---" -ForegroundColor blue
2323
pip3.exe install --no-index --find-links .patroni-packages -r requirements.txt
24-
pip3.exe install --no-index --find-links .patroni-packages psycopg-binary
24+
pip3.exe install --no-index --find-links .patroni-packages psycopg
2525
pip3.exe install --no-index --find-links .patroni-packages cdiff
2626
Set-Location '..'
2727
Write-Host "--- Patroni packages installed ---`n" -ForegroundColor green

0 commit comments

Comments
 (0)