Skip to content

Commit

Permalink
Fix downgrade path for 2.18.0
Browse files Browse the repository at this point in the history
This patch adjusts the downgrade script generation to not include
incompatible files from the 2.18.0 release that would break script
generation and replaces them with a working version. This adjustment
can be removed after we release of 2.18.1.
This patch also reenables the downgrade test.
  • Loading branch information
svenklemm committed Jan 24, 2025
1 parent 2b0011e commit 2c52b54
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/update-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ jobs:
PATH="/usr/lib/postgresql/${{ matrix.pg }}/bin:$PATH"
./scripts/test_updates.sh
# Temporary disabled downgrade for 2.18.0
# - name: Downgrade tests PG${{ matrix.pg }}
# if: always()
# run: |
# PATH="/usr/lib/postgresql/${{ matrix.pg }}/bin:$PATH"
# ./scripts/test_downgrade.sh
- name: Downgrade tests PG${{ matrix.pg }}
if: always()
run: |
PATH="/usr/lib/postgresql/${{ matrix.pg }}/bin:$PATH"
./scripts/test_downgrade.sh
- name: Update diff
if: failure()
Expand Down
4 changes: 4 additions & 0 deletions cmake/GenerateScripts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ function(generate_downgrade_script)
_epilog_files
IGNORE_ERRORS)

if(_downgrade_TARGET_VERSION VERSION_EQUAL 2.18.0)
list(TRANSFORM _epilog_files REPLACE "^.*/hypercore.sql" "${CMAKE_CURRENT_SOURCE_DIR}/pre_install/tam.functions.sql")
endif()

foreach(_downgrade_file ${_downgrade_PRE_FILES})
get_filename_component(_downgrade_filename ${_downgrade_file} NAME)
configure_file(${_downgrade_file} ${_downgrade_INPUT_DIRECTORY}/${_downgrade_filename} COPYONLY)
Expand Down

0 comments on commit 2c52b54

Please sign in to comment.