From 9778d4f415443d0bd755c68e30a01191e5e7be05 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 09:01:16 +0200 Subject: [PATCH 01/17] chore(create-release.yml): update sonar-push.yml version to v0.3.9 chore(extension-attach-artifact-release.yml): update script file versions to v0.3.9 chore(extension-release-published.yml): update extension-release-prepare.yml version to v0.3.9 chore(os-extension-test.yml): update sonar-pull-request.yml version to v0.3.9 chore(package-deb.yml): update file versions to v0.3.9 chore(pro-extension-test.yml): update sonar-pull-request.yml version to v0.3.9 fix(postinst): remove unnecessary shell execution fix(liquibase-env.sh): remove unnecessary shell execution --- .github/workflows/create-release.yml | 2 +- .github/workflows/extension-attach-artifact-release.yml | 6 +++--- .github/workflows/extension-release-published.yml | 2 +- .github/workflows/os-extension-test.yml | 2 +- .github/workflows/package-deb.yml | 8 ++++---- .github/workflows/pro-extension-test.yml | 2 +- src/liquibase/deb/control/postinst | 3 +-- src/liquibase/main/archive/liquibase-env.sh | 1 - 8 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index a0d2ca9a..812749b6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,7 +5,7 @@ on: jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.3.8 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.3.9 secrets: inherit create-release: diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index efcc39be..f7c97453 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -31,9 +31,9 @@ jobs: - name: Get Reusable Script Files run: | - curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/.github/get_draft_release.sh - curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/.github/sign_artifact.sh - curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/.github/upload_asset.sh + curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/get_draft_release.sh + curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/sign_artifact.sh + curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/upload_asset.sh chmod +x $PWD/.github/get_draft_release.sh chmod +x $PWD/.github/sign_artifact.sh chmod +x $PWD/.github/upload_asset.sh diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index 3a2ba2ff..a74995ac 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -68,5 +68,5 @@ jobs: maven-release: needs: release - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.3.8 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.3.9 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/os-extension-test.yml b/.github/workflows/os-extension-test.yml index deeb4cd4..9ae3ca7f 100644 --- a/.github/workflows/os-extension-test.yml +++ b/.github/workflows/os-extension-test.yml @@ -89,5 +89,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.8 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.9 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/package-deb.yml b/.github/workflows/package-deb.yml index 0d22a21a..dca42b8b 100644 --- a/.github/workflows/package-deb.yml +++ b/.github/workflows/package-deb.yml @@ -54,10 +54,10 @@ jobs: # Under the src folder is where specific packages files live. The GitHub action inputs will modify the universal package-deb-pom.xml to tell the process which assets to use during the packaging step mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/deb/control mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/main/archive - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/src/${{ inputs.artifactId }}/deb/control/control - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/src/${{ inputs.artifactId }}/deb/control/postinst - curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh - curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.3.8/.github/package-deb-pom.xml + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/src/${{ inputs.artifactId }}/deb/control/control + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/src/${{ inputs.artifactId }}/deb/control/postinst + curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh + curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/package-deb-pom.xml - name: Set up Maven uses: stCarolas/setup-maven@v4.5 diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 0f75682d..1049d70b 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -109,5 +109,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.8 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.9 secrets: inherit \ No newline at end of file diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 22fc2013..8dc9e411 100644 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -2,5 +2,4 @@ # Needed once the installation is complete. No need to open a new terminal export LIQUIBASE_HOME=/opt/liquibase -export PATH=$PATH:$LIQUIBASE_HOME -exec $SHELL \ No newline at end of file +export PATH=$PATH:$LIQUIBASE_HOME \ No newline at end of file diff --git a/src/liquibase/main/archive/liquibase-env.sh b/src/liquibase/main/archive/liquibase-env.sh index 641720a4..73e7dce9 100644 --- a/src/liquibase/main/archive/liquibase-env.sh +++ b/src/liquibase/main/archive/liquibase-env.sh @@ -3,4 +3,3 @@ # Needed when restarting the terminal export LIQUIBASE_HOME=/opt/liquibase export PATH=$PATH:$LIQUIBASE_HOME -exec $SHELL \ No newline at end of file From ae9ed4f073629e6e7d9b681f483c564667b37af7 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 09:20:58 +0200 Subject: [PATCH 02/17] fix(liquibase): update postinst and liquibase-env.sh scripts to add LIQUIBASE_HOME and PATH to ~/.profile The postinst script was updated to append the `export LIQUIBASE_HOME=$LIQUIBASE_HOME` and `export PATH=$PATH:$LIQUIBASE_HOME` lines to the `~/.profile` file. This ensures that the LIQUIBASE_HOME environment variable and the liquibase executable are available in the user's profile. Similarly, the liquibase-env.sh script was also updated to append the same lines to the `~/.profile` file. These changes were made to ensure that the LIQUIBASE_HOME environment variable and the liquibase executable are automatically set up when the terminal is restarted, providing a more seamless experience for users. --- src/liquibase/deb/control/postinst | 5 +++-- src/liquibase/main/archive/liquibase-env.sh | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 8dc9e411..24d2734f 100644 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,5 +1,6 @@ #!/bin/sh # Needed once the installation is complete. No need to open a new terminal -export LIQUIBASE_HOME=/opt/liquibase -export PATH=$PATH:$LIQUIBASE_HOME \ No newline at end of file +echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile +echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile +source ~/.profile \ No newline at end of file diff --git a/src/liquibase/main/archive/liquibase-env.sh b/src/liquibase/main/archive/liquibase-env.sh index 73e7dce9..975eba53 100644 --- a/src/liquibase/main/archive/liquibase-env.sh +++ b/src/liquibase/main/archive/liquibase-env.sh @@ -1,5 +1,6 @@ #!/bin/sh # Needed when restarting the terminal -export LIQUIBASE_HOME=/opt/liquibase -export PATH=$PATH:$LIQUIBASE_HOME +echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile +echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile +source ~/.profile \ No newline at end of file From 772044546de3752ef241b6bccf7f51bfa0338968 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 09:28:12 +0200 Subject: [PATCH 03/17] fix(liquibase): update LIQUIBASE_HOME path in postinst and liquibase-env.sh scripts The LIQUIBASE_HOME path in the postinst and liquibase-env.sh scripts was updated to "/opt/liquibase" to reflect the correct installation directory. This change ensures that the LIQUIBASE_HOME environment variable is set correctly and that the liquibase executable is added to the PATH. --- src/liquibase/deb/control/postinst | 2 +- src/liquibase/main/archive/liquibase-env.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 24d2734f..8a5dd11f 100644 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,6 +1,6 @@ #!/bin/sh # Needed once the installation is complete. No need to open a new terminal -echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile +echo "export LIQUIBASE_HOME=/opt/liquibase" >> ~/.profile echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile source ~/.profile \ No newline at end of file diff --git a/src/liquibase/main/archive/liquibase-env.sh b/src/liquibase/main/archive/liquibase-env.sh index 975eba53..4c3d62c6 100644 --- a/src/liquibase/main/archive/liquibase-env.sh +++ b/src/liquibase/main/archive/liquibase-env.sh @@ -1,6 +1,6 @@ #!/bin/sh # Needed when restarting the terminal -echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile +echo "export LIQUIBASE_HOME=/opt/liquibase" >> ~/.profile echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile -source ~/.profile \ No newline at end of file +source ~/.profile From 3ad27a056a946f0e4801599c378563f5c9070073 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 09:41:18 +0200 Subject: [PATCH 04/17] fix(liquibase): change shebang from /bin/sh to /bin/bash in postinst script for compatibility feat(liquibase): add post-removal script (postrm) to remove liquibase-related lines from the profile --- src/liquibase/deb/control/postinst | 11 ++++++++--- src/liquibase/deb/control/postrm | 10 ++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/liquibase/deb/control/postinst create mode 100755 src/liquibase/deb/control/postrm diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst old mode 100644 new mode 100755 index 8a5dd11f..77fda03a --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,6 +1,11 @@ -#!/bin/sh +#!/bin/bash + +LIQUIBASE_HOME=/opt/liquibase # Needed once the installation is complete. No need to open a new terminal -echo "export LIQUIBASE_HOME=/opt/liquibase" >> ~/.profile +sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> sudo /etc/profile +sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> sudo /etc/profile + echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile -source ~/.profile \ No newline at end of file + +source /etc/profile \ No newline at end of file diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm new file mode 100755 index 00000000..c595e319 --- /dev/null +++ b/src/liquibase/deb/control/postrm @@ -0,0 +1,10 @@ +#!/bin/bash + +LIQUIBASE_HOME=/opt/liquibase + +# Remove the liquibase-related lines from the profile +sudo sed -i '/LIQUIBASE_HOME=/d' /etc/profile +sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' /etc/profile + +# Source the profile to apply changes immediately +source /etc/profile From 3e50da98924b1ed0314273b750001baf3f372bdf Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 09:41:38 +0200 Subject: [PATCH 05/17] fix(liquibase-env.sh): change shebang from /bin/sh to /bin/bash for compatibility with bash syntax fix(liquibase-env.sh): add LIQUIBASE_HOME variable assignment to /opt/liquibase for proper installation fix(liquibase-env.sh): add LIQUIBASE_HOME and PATH exports to /etc/profile for persistent environment variables fix(liquibase-env.sh): remove unnecessary export of LIQUIBASE_HOME and PATH to ~/.profile fix(liquibase-env.sh): source /etc/profile to load the updated environment variables --- src/liquibase/main/archive/liquibase-env.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) mode change 100644 => 100755 src/liquibase/main/archive/liquibase-env.sh diff --git a/src/liquibase/main/archive/liquibase-env.sh b/src/liquibase/main/archive/liquibase-env.sh old mode 100644 new mode 100755 index 4c3d62c6..77fda03a --- a/src/liquibase/main/archive/liquibase-env.sh +++ b/src/liquibase/main/archive/liquibase-env.sh @@ -1,6 +1,11 @@ -#!/bin/sh +#!/bin/bash + +LIQUIBASE_HOME=/opt/liquibase + +# Needed once the installation is complete. No need to open a new terminal +sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> sudo /etc/profile +sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> sudo /etc/profile -# Needed when restarting the terminal -echo "export LIQUIBASE_HOME=/opt/liquibase" >> ~/.profile echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile -source ~/.profile + +source /etc/profile \ No newline at end of file From 7a9e3cd87b8db914df851d045baec364bb32c2c4 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 09:52:14 +0200 Subject: [PATCH 06/17] chore(package-deb-pom.xml): remove unused data entry for artifactId-env.sh file fix(postinst): modify postinst script to use sh instead of bash for compatibility fix(postrm): modify postrm script to use sh instead of bash for compatibility refactor(postinst, postrm): update postinst and postrm scripts to modify and load user's shell configuration file using sh instead of sudo refactor(postinst, postrm): remove unnecessary lines from postinst and postrm scripts that source /etc/profile and add LIQUIBASE_HOME to ~/.profile refactor(postrm): remove unnecessary lines from postrm script that remove LIQUIBASE_HOME and export PATH from /etc/profile --- .github/package-deb-pom.xml | 9 --------- src/liquibase/deb/control/postinst | 15 ++++++--------- src/liquibase/deb/control/postrm | 14 ++++++-------- src/liquibase/main/archive/liquibase-env.sh | 11 ----------- 4 files changed, 12 insertions(+), 37 deletions(-) delete mode 100755 src/liquibase/main/archive/liquibase-env.sh diff --git a/.github/package-deb-pom.xml b/.github/package-deb-pom.xml index 4398de10..cdd264c6 100644 --- a/.github/package-deb-pom.xml +++ b/.github/package-deb-pom.xml @@ -60,15 +60,6 @@ 755 - - ${project.basedir}/src/${project.artifactId}/main/archive/${project.artifactId}-env.sh - file - - perm - /etc/profile.d/ - 755 - - diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 77fda03a..65a92de7 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,11 +1,8 @@ -#!/bin/bash +#!/bin/sh -LIQUIBASE_HOME=/opt/liquibase +# Modify the user's shell configuration file +echo 'export LIQUIBASE_HOME=/opt/liquibase' >> "$HOME/.bashrc" +echo 'export PATH=$PATH:$LIQUIBASE_HOME' >> "$HOME/.bashrc" -# Needed once the installation is complete. No need to open a new terminal -sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> sudo /etc/profile -sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> sudo /etc/profile - -echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile - -source /etc/profile \ No newline at end of file +# Load the updated configuration into the current shell session +. "$HOME/.bashrc" diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index c595e319..3cbbea5f 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -1,10 +1,8 @@ -#!/bin/bash +#!/bin/sh -LIQUIBASE_HOME=/opt/liquibase +# Remove the lines added by the postinst script from the user's shell configuration file +sed -i '/LIQUIBASE_HOME=\/opt\/liquibase/d' "$HOME/.bashrc" +sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' "$HOME/.bashrc" -# Remove the liquibase-related lines from the profile -sudo sed -i '/LIQUIBASE_HOME=/d' /etc/profile -sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' /etc/profile - -# Source the profile to apply changes immediately -source /etc/profile +# Load the updated configuration into the current shell session +. "$HOME/.bashrc" \ No newline at end of file diff --git a/src/liquibase/main/archive/liquibase-env.sh b/src/liquibase/main/archive/liquibase-env.sh deleted file mode 100755 index 77fda03a..00000000 --- a/src/liquibase/main/archive/liquibase-env.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -LIQUIBASE_HOME=/opt/liquibase - -# Needed once the installation is complete. No need to open a new terminal -sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> sudo /etc/profile -sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> sudo /etc/profile - -echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile - -source /etc/profile \ No newline at end of file From b0b6fa7115350b13590bfddf4d7cab56197b0010 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 10:01:16 +0200 Subject: [PATCH 07/17] fix(liquibase): change shebang from /bin/sh to /bin/bash for compatibility with bash syntax fix(liquibase): update postinst script to set LIQUIBASE_HOME and PATH in /etc/profile instead of user's .bashrc fix(liquibase): update postrm script to remove liquibase-related lines from /etc/profile instead of user's .bashrc --- src/liquibase/deb/control/postinst | 15 +++++++++------ src/liquibase/deb/control/postrm | 14 ++++++++------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 65a92de7..77fda03a 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,8 +1,11 @@ -#!/bin/sh +#!/bin/bash -# Modify the user's shell configuration file -echo 'export LIQUIBASE_HOME=/opt/liquibase' >> "$HOME/.bashrc" -echo 'export PATH=$PATH:$LIQUIBASE_HOME' >> "$HOME/.bashrc" +LIQUIBASE_HOME=/opt/liquibase -# Load the updated configuration into the current shell session -. "$HOME/.bashrc" +# Needed once the installation is complete. No need to open a new terminal +sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> sudo /etc/profile +sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> sudo /etc/profile + +echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile + +source /etc/profile \ No newline at end of file diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index 3cbbea5f..c595e319 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -1,8 +1,10 @@ -#!/bin/sh +#!/bin/bash -# Remove the lines added by the postinst script from the user's shell configuration file -sed -i '/LIQUIBASE_HOME=\/opt\/liquibase/d' "$HOME/.bashrc" -sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' "$HOME/.bashrc" +LIQUIBASE_HOME=/opt/liquibase -# Load the updated configuration into the current shell session -. "$HOME/.bashrc" \ No newline at end of file +# Remove the liquibase-related lines from the profile +sudo sed -i '/LIQUIBASE_HOME=/d' /etc/profile +sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' /etc/profile + +# Source the profile to apply changes immediately +source /etc/profile From 184e03c2532293d2cb1c7b611972ded395d3b6d7 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 11:04:40 +0200 Subject: [PATCH 08/17] fix(liquibase): change shebang from bash to sh in postinst script for better compatibility fix(liquibase): update path to ~/.profile instead of /etc/profile in postinst and postrm scripts for correct environment variable setup and removal --- src/liquibase/deb/control/postinst | 10 ++++------ src/liquibase/deb/control/postrm | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 77fda03a..7696bc2e 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,11 +1,9 @@ -#!/bin/bash +#!/bin/sh LIQUIBASE_HOME=/opt/liquibase # Needed once the installation is complete. No need to open a new terminal -sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> sudo /etc/profile -sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> sudo /etc/profile +sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile +sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile -echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile - -source /etc/profile \ No newline at end of file +source ~/.profile \ No newline at end of file diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index c595e319..cb259f1a 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -3,8 +3,8 @@ LIQUIBASE_HOME=/opt/liquibase # Remove the liquibase-related lines from the profile -sudo sed -i '/LIQUIBASE_HOME=/d' /etc/profile -sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' /etc/profile +sudo sed -i '/LIQUIBASE_HOME=/d' ~/.profile +sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' ~/.profile # Source the profile to apply changes immediately -source /etc/profile +source ~/.profile From 1f8d4fd48e9e42b8fc3733732a87f03c57cf9dc2 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 11:11:13 +0200 Subject: [PATCH 09/17] fix(postrm): remove liquibase path from PATH environment variable to ensure proper uninstallation --- src/liquibase/deb/control/postrm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index cb259f1a..65c1a112 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -5,6 +5,8 @@ LIQUIBASE_HOME=/opt/liquibase # Remove the liquibase-related lines from the profile sudo sed -i '/LIQUIBASE_HOME=/d' ~/.profile sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' ~/.profile - +path=$PATH +path_without_liquibase=$(echo "$path" | sed 's/:\/opt\/liquibase//g') +export PATH=$path_without_liquibase # Source the profile to apply changes immediately source ~/.profile From dea9f996ad9a379b975369a609c93dd42fd0c062 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 11:17:29 +0200 Subject: [PATCH 10/17] fix(postinst): change shebang from /bin/sh to /bin/bash for better compatibility with bash scripts --- src/liquibase/deb/control/postinst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 7696bc2e..d0bd4067 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash LIQUIBASE_HOME=/opt/liquibase From 2a43737c31bee4cebb782ec611bad1c3f71f690f Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 11:23:13 +0200 Subject: [PATCH 11/17] fix(postinst, postrm): change shebang from bash to sh for better compatibility fix(postinst, postrm): change sourcing of ~/.profile from 'source' to '.' for better compatibility --- src/liquibase/deb/control/postinst | 4 ++-- src/liquibase/deb/control/postrm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index d0bd4067..6312f55e 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh LIQUIBASE_HOME=/opt/liquibase @@ -6,4 +6,4 @@ LIQUIBASE_HOME=/opt/liquibase sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile -source ~/.profile \ No newline at end of file +. ~/.profile \ No newline at end of file diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index 65c1a112..a46d6763 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh LIQUIBASE_HOME=/opt/liquibase @@ -9,4 +9,4 @@ path=$PATH path_without_liquibase=$(echo "$path" | sed 's/:\/opt\/liquibase//g') export PATH=$path_without_liquibase # Source the profile to apply changes immediately -source ~/.profile +. ~/.profile From 10f73a96b50b0c2fa10ec751a76dbd7497f02130 Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 11:35:05 +0200 Subject: [PATCH 12/17] chore(liquibase): add debug mode to postinst and postrm scripts for troubleshooting --- src/liquibase/deb/control/postinst | 2 +- src/liquibase/deb/control/postrm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 6312f55e..9e1f779c 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,5 +1,5 @@ #!/bin/sh - +set -x LIQUIBASE_HOME=/opt/liquibase # Needed once the installation is complete. No need to open a new terminal diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index a46d6763..183ca6d8 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -1,5 +1,5 @@ #!/bin/sh - +set -x LIQUIBASE_HOME=/opt/liquibase # Remove the liquibase-related lines from the profile From e517f3c0a64874e19fcfd5066fd375b421d7333b Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 12:01:48 +0200 Subject: [PATCH 13/17] fix(liquibase): change shebang from `#!/bin/sh` to `#!/bin/bash` for better compatibility feat(liquibase): add support for adding and removing LIQUIBASE_HOME environment variable and PATH to user's .profile file --- src/liquibase/deb/control/postinst | 27 ++++++++++++++++++------- src/liquibase/deb/control/postrm | 32 ++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 18 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 9e1f779c..402e78fa 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,9 +1,22 @@ -#!/bin/sh -set -x -LIQUIBASE_HOME=/opt/liquibase +#!/bin/bash -# Needed once the installation is complete. No need to open a new terminal -sudo echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" >> ~/.profile -sudo echo "export PATH=\$PATH:\$LIQUIBASE_HOME" >> ~/.profile +# Define LIQUIBASE_HOME +LIQUIBASE_HOME="/opt/liquibase" -. ~/.profile \ No newline at end of file +# Iterate through all user home directories +for user_home in /home/*; do + if [ -d "$user_home" ]; then + user=$(basename "$user_home") + profile_file="$user_home/.profile" + + # Check if the .profile file exists for the user + if [ -f "$profile_file" ]; then + echo "Adding LIQUIBASE_HOME to .profile for user: $user" + echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" | sudo tee -a "$profile_file" + echo "export PATH=\$PATH:\$LIQUIBASE_HOME" | sudo tee -a "$profile_file" + . "$profile_file" + else + echo "No .profile found for user: $user" + fi + fi +done \ No newline at end of file diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index 183ca6d8..0995a227 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -1,12 +1,22 @@ -#!/bin/sh -set -x -LIQUIBASE_HOME=/opt/liquibase +#!/bin/bash -# Remove the liquibase-related lines from the profile -sudo sed -i '/LIQUIBASE_HOME=/d' ~/.profile -sudo sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' ~/.profile -path=$PATH -path_without_liquibase=$(echo "$path" | sed 's/:\/opt\/liquibase//g') -export PATH=$path_without_liquibase -# Source the profile to apply changes immediately -. ~/.profile +# Define LIQUIBASE_HOME +LIQUIBASE_HOME="/opt/liquibase" + +# Iterate through all user home directories +for user_home in /home/*; do + if [ -d "$user_home" ]; then + user=$(basename "$user_home") + profile_file="$user_home/.profile" + + # Check if the .profile file exists for the user + if [ -f "$profile_file" ]; then + echo "Removing LIQUIBASE_HOME from .profile for user: $user" + sed -i '/LIQUIBASE_HOME=/d' "$profile_file" + sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' "$profile_file" + . "$profile_file" + else + echo "No .profile found for user: $user" + fi + fi +done \ No newline at end of file From 6939ecada2739abcd6d906d2c61cbd32dfd5ae9a Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 16 Aug 2023 12:52:42 +0200 Subject: [PATCH 14/17] fix(postinst): check if LIQUIBASE_HOME is already in PATH before adding it to .profile file to avoid duplication The changes were made to the postinst file in the src/liquibase/deb/control directory. The script checks if the LIQUIBASE_HOME environment variable is already present in the .profile file for each user's home directory. If it is not present, the script adds the LIQUIBASE_HOME variable and appends it to the PATH variable in the .profile file. This change was made to prevent duplication of the LIQUIBASE_HOME variable in the .profile file. --- src/liquibase/deb/control/postinst | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 402e78fa..385374a7 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -12,9 +12,13 @@ for user_home in /home/*; do # Check if the .profile file exists for the user if [ -f "$profile_file" ]; then echo "Adding LIQUIBASE_HOME to .profile for user: $user" - echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" | sudo tee -a "$profile_file" - echo "export PATH=\$PATH:\$LIQUIBASE_HOME" | sudo tee -a "$profile_file" - . "$profile_file" + if grep -q "$LIQUIBASE_HOME" "$profile_file"; then + echo "LIQUIBASE_HOME already in PATH for user: $user" + else + echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" | sudo tee -a "$profile_file" + echo "export PATH=\$PATH:\$LIQUIBASE_HOME" | sudo tee -a "$profile_file" + . "$profile_file" + fi else echo "No .profile found for user: $user" fi From a2b0d052fb5d23657ac548667667999a72be9bd7 Mon Sep 17 00:00:00 2001 From: jandroav Date: Thu, 17 Aug 2023 08:38:44 +0200 Subject: [PATCH 15/17] refactor(package-deb-pom.xml): update prefix in mapper to /usr/bin for better installation location refactor(postinst): update LIQUIBASE_HOME to /usr/bin for better installation location and remove unnecessary code for updating user profiles refactor(postrm): unset LIQUIBASE_HOME and remove unnecessary code for updating user profiles --- .github/package-deb-pom.xml | 2 +- src/liquibase/deb/control/postinst | 24 +----------------------- src/liquibase/deb/control/postrm | 21 ++------------------- 3 files changed, 4 insertions(+), 43 deletions(-) diff --git a/.github/package-deb-pom.xml b/.github/package-deb-pom.xml index cdd264c6..48b9d9df 100644 --- a/.github/package-deb-pom.xml +++ b/.github/package-deb-pom.xml @@ -56,7 +56,7 @@ directory perm - /opt/liquibase + /usr/bin 755 diff --git a/src/liquibase/deb/control/postinst b/src/liquibase/deb/control/postinst index 385374a7..0013840c 100755 --- a/src/liquibase/deb/control/postinst +++ b/src/liquibase/deb/control/postinst @@ -1,26 +1,4 @@ #!/bin/bash # Define LIQUIBASE_HOME -LIQUIBASE_HOME="/opt/liquibase" - -# Iterate through all user home directories -for user_home in /home/*; do - if [ -d "$user_home" ]; then - user=$(basename "$user_home") - profile_file="$user_home/.profile" - - # Check if the .profile file exists for the user - if [ -f "$profile_file" ]; then - echo "Adding LIQUIBASE_HOME to .profile for user: $user" - if grep -q "$LIQUIBASE_HOME" "$profile_file"; then - echo "LIQUIBASE_HOME already in PATH for user: $user" - else - echo "export LIQUIBASE_HOME=$LIQUIBASE_HOME" | sudo tee -a "$profile_file" - echo "export PATH=\$PATH:\$LIQUIBASE_HOME" | sudo tee -a "$profile_file" - . "$profile_file" - fi - else - echo "No .profile found for user: $user" - fi - fi -done \ No newline at end of file +LIQUIBASE_HOME="/usr/bin" diff --git a/src/liquibase/deb/control/postrm b/src/liquibase/deb/control/postrm index 0995a227..2983b159 100755 --- a/src/liquibase/deb/control/postrm +++ b/src/liquibase/deb/control/postrm @@ -1,22 +1,5 @@ #!/bin/bash -# Define LIQUIBASE_HOME -LIQUIBASE_HOME="/opt/liquibase" +# unset LIQUIBASE_HOME +unset LIQUIBASE_HOME -# Iterate through all user home directories -for user_home in /home/*; do - if [ -d "$user_home" ]; then - user=$(basename "$user_home") - profile_file="$user_home/.profile" - - # Check if the .profile file exists for the user - if [ -f "$profile_file" ]; then - echo "Removing LIQUIBASE_HOME from .profile for user: $user" - sed -i '/LIQUIBASE_HOME=/d' "$profile_file" - sed -i '/export PATH=\$PATH:\$LIQUIBASE_HOME/d' "$profile_file" - . "$profile_file" - else - echo "No .profile found for user: $user" - fi - fi -done \ No newline at end of file From 547fe183ce8c6f9da93284fa7ab7306065b3b05f Mon Sep 17 00:00:00 2001 From: jandroav Date: Wed, 23 Aug 2023 11:08:03 +0200 Subject: [PATCH 16/17] fix(extension-attach-artifact-release.yml): change assets pattern from "${{ env.artifact_id }}-*" to '*.*' to include all files as assets in the release --- .github/workflows/extension-attach-artifact-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index f7c97453..d2dd090c 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -68,7 +68,7 @@ jobs: tag: ${{ env.release_tag }} fail-if-no-assets: false fail-if-no-release: false - assets: "${{ env.artifact_id }}-*" + assets: '*.*' - name: Import GPG key id: import_gpg From f199fa578cf3ced2bf16d176c56b117b4e78b35b Mon Sep 17 00:00:00 2001 From: Alejandro Alvarez Date: Fri, 1 Sep 2023 15:34:41 +0200 Subject: [PATCH 17/17] DAT-15348 DevOps :: run nightly builds for extensions against core master-snapshot (#62) * chore(create-release.yml): update sonar-push.yml version to v0.4.1 for improved functionality chore(extension-attach-artifact-release.yml): update script file versions to v0.4.1 for improved functionality chore(extension-release-published.yml): update extension-release-prepare.yml version to v0.4.1 for improved functionality chore(os-extension-test.yml): update sonar-pull-request.yml version to v0.4.1 for improved functionality chore(package-deb.yml): update build-logic versions to v0.4.1 for improved functionality chore(pro-extension-test.yml): set latest liquibase version to master-SNAPSHOT if nightly build is specified * fix(pro-extension-test.yml): correct typo in description of nightly build option The description of the nightly build option was misspelled as "nigthly" instead of "nightly". This commit fixes the typo to improve clarity and consistency in the codebase. * chore(pro-extension-test.yml): fix typo in description of nightly option * chore(os-extension-test.yml): add support for nightly builds against liquibase master-SNAPSHOT feat(os-extension-test.yml): set latest liquibase version to master-SNAPSHOT if nightly flag is set --- .github/workflows/create-release.yml | 2 +- .../workflows/extension-attach-artifact-release.yml | 6 +++--- .github/workflows/extension-release-published.yml | 2 +- .github/workflows/os-extension-test.yml | 11 ++++++++++- .github/workflows/package-deb.yml | 8 ++++---- .github/workflows/pro-extension-test.yml | 11 ++++++++++- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 812749b6..87c864b6 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -5,7 +5,7 @@ on: jobs: sonar: - uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.3.9 + uses: liquibase/build-logic/.github/workflows/sonar-push.yml@v0.4.1 secrets: inherit create-release: diff --git a/.github/workflows/extension-attach-artifact-release.yml b/.github/workflows/extension-attach-artifact-release.yml index d2dd090c..3b8d627b 100644 --- a/.github/workflows/extension-attach-artifact-release.yml +++ b/.github/workflows/extension-attach-artifact-release.yml @@ -31,9 +31,9 @@ jobs: - name: Get Reusable Script Files run: | - curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/get_draft_release.sh - curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/sign_artifact.sh - curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/upload_asset.sh + curl -o $PWD/.github/get_draft_release.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/.github/get_draft_release.sh + curl -o $PWD/.github/sign_artifact.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/.github/sign_artifact.sh + curl -o $PWD/.github/upload_asset.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/.github/upload_asset.sh chmod +x $PWD/.github/get_draft_release.sh chmod +x $PWD/.github/sign_artifact.sh chmod +x $PWD/.github/upload_asset.sh diff --git a/.github/workflows/extension-release-published.yml b/.github/workflows/extension-release-published.yml index a74995ac..dba2e183 100644 --- a/.github/workflows/extension-release-published.yml +++ b/.github/workflows/extension-release-published.yml @@ -68,5 +68,5 @@ jobs: maven-release: needs: release - uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.3.9 + uses: liquibase/build-logic/.github/workflows/extension-release-prepare.yml@v0.4.1 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/os-extension-test.yml b/.github/workflows/os-extension-test.yml index 9ae3ca7f..54832d24 100644 --- a/.github/workflows/os-extension-test.yml +++ b/.github/workflows/os-extension-test.yml @@ -13,6 +13,11 @@ on: required: false default: '["ubuntu-latest", "windows-latest"]' type: string + nigthly: + description: 'Specifies nightly builds against liquibase master-SNAPSHOT' + required: false + default: false + type: boolean jobs: build: @@ -28,6 +33,10 @@ jobs: distribution: 'temurin' cache: 'maven' + - name: Set latest liquibase version + if: ${{ inputs.nigthly }} + run: mvn versions:set-property -Dproperty=liquibase.version -DnewVersion=master-SNAPSHOT + - name: Build and Package run: mvn -B dependency:go-offline clean package -DskipTests=true @@ -89,5 +98,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.9 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.1 secrets: inherit \ No newline at end of file diff --git a/.github/workflows/package-deb.yml b/.github/workflows/package-deb.yml index dca42b8b..df0a7801 100644 --- a/.github/workflows/package-deb.yml +++ b/.github/workflows/package-deb.yml @@ -54,10 +54,10 @@ jobs: # Under the src folder is where specific packages files live. The GitHub action inputs will modify the universal package-deb-pom.xml to tell the process which assets to use during the packaging step mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/deb/control mkdir -p $PWD/.github/src/${{ inputs.artifactId }}/main/archive - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/src/${{ inputs.artifactId }}/deb/control/control - curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/src/${{ inputs.artifactId }}/deb/control/postinst - curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh - curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.3.9/.github/package-deb-pom.xml + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/control https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/src/${{ inputs.artifactId }}/deb/control/control + curl -o $PWD/.github/src/${{ inputs.artifactId }}/deb/control/postinst https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/src/${{ inputs.artifactId }}/deb/control/postinst + curl -o $PWD/.github/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/src/${{ inputs.artifactId }}/main/archive/${{ inputs.artifactId }}-env.sh + curl -o $PWD/.github/package-deb-pom.xml https://raw.githubusercontent.com/liquibase/build-logic/v0.4.1/.github/package-deb-pom.xml - name: Set up Maven uses: stCarolas/setup-maven@v4.5 diff --git a/.github/workflows/pro-extension-test.yml b/.github/workflows/pro-extension-test.yml index 1049d70b..2eecb520 100644 --- a/.github/workflows/pro-extension-test.yml +++ b/.github/workflows/pro-extension-test.yml @@ -13,6 +13,11 @@ on: required: false default: '["ubuntu-latest", "windows-latest"]' type: string + nigthly: + description: 'Specifies nightly builds against liquibase master-SNAPSHOT' + required: false + default: false + type: boolean secrets: SONAR_TOKEN: description: 'SONAR_TOKEN from the caller workflow' @@ -48,6 +53,10 @@ jobs: distribution: 'temurin' cache: 'maven' + - name: Set latest liquibase version + if: ${{ inputs.nigthly }} + run: mvn versions:set-property -Dproperty=liquibase.version -DnewVersion=master-SNAPSHOT + - name: Build and Package run: mvn -B dependency:go-offline clean package -DskipTests=true @@ -109,5 +118,5 @@ jobs: sonar-pr: needs: [ unit-test ] - uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.3.9 + uses: liquibase/build-logic/.github/workflows/sonar-pull-request.yml@v0.4.1 secrets: inherit \ No newline at end of file