Skip to content

Commit

Permalink
ACMS-000: Allow version in composer.json file for ACMS modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshreeputra committed Apr 24, 2024
1 parent 08bde3c commit 54bdcee
Show file tree
Hide file tree
Showing 18 changed files with 104 additions and 76 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/acquia_cms_ci.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ jobs:
curl https://gist.githubusercontent.com/chandan-singh7929/902a17bbf0f5c0e0ee536dd5983875f3/raw/4031ae76ca5e8f08b98545bfdcda327f6d38be58/remove-local-settings.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
Expand Down Expand Up @@ -97,6 +100,7 @@ jobs:
composer install
php vendor/bin/drupal-check modules
php vendor/bin/drupal-check tests/src
integrated_tests:
if: ${{ github.event_name == 'pull_request' }}
name: ${{ matrix.acms_job }} (${{ matrix.orca-job }})
Expand Down Expand Up @@ -164,6 +168,9 @@ jobs:
# aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Update the CI by adding patches without pinning the following modules.
#composer require "drupal/facets:^2.0.6" --no-update --no-install -d modules/acquia_cms_search
Expand Down Expand Up @@ -199,6 +206,7 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
backstop_tests:
if: ${{ github.event_name == 'pull_request' }}
name: backstop with ${{ matrix.orca-job }} on PHP ${{ matrix.php-version }}
Expand Down Expand Up @@ -268,6 +276,9 @@ jobs:
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
Expand Down Expand Up @@ -299,6 +310,7 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
run_update_hooks:
if: ${{ github.event_name == 'pull_request' }}
name: "Module Upgrades"
Expand Down Expand Up @@ -355,6 +367,9 @@ jobs:
curl https://gist.githubusercontent.com/chandan-singh7929/902a17bbf0f5c0e0ee536dd5983875f3/raw/4031ae76ca5e8f08b98545bfdcda327f6d38be58/remove-local-settings.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
Expand All @@ -364,7 +379,10 @@ jobs:
run: ./tests/ci/install.sh
- name: Run Update hooks
shell: 'script -q -e -c "bash {0}"'
run: ./tests/ci/run_update_hooks.sh
run: |
# Remove version form composer.json file.
find modules/*/ -type f -name "composer.json" -exec sed -i '' -e '/"version": "dev-develop",/d' '{}' ';'
./tests/ci/run_update_hooks.sh
env:
# @see ./tests/ci/before_install.blt.sh
DRUPAL_ORG_CHANGES: ${{ env.DRUPAL_ORG_CHANGES }}
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/acquia_cms_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ jobs:
curl https://gist.githubusercontent.com/vishalkhode1/0e26b2e9637722a256c74a6cb8496e9d/raw/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version form composer.json file.
find modules/*/ -type f -name "composer.json" -exec sed -i '' -e '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
Expand All @@ -71,6 +74,7 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
integrated_tests:
name: ${{ matrix.acms_job }} (${{ matrix.orca-job }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -108,12 +112,17 @@ jobs:
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version form composer.json file.
find modules/*/ -type f -name "composer.json" -exec sed -i '' -e '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
# One of the patch is failing on Drupal Core 9.5. So remove that patch.
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_LATEST_LTS" ]; then
# Update common to 2.x for Drupal 9.5
sed -i 's/"dev-develop": "3.x-dev"/"dev-develop": "2.x-dev"/' modules/acquia_cms_common/composer.json
# Remove the failing php on Drupal Core 9.5.
# NEW_JSON=$(composer config extra.patches."drupal/core" | sed -r 's/,?"3328187.*3142.patch"//')
Expand Down Expand Up @@ -162,6 +171,7 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
isolated_tests:
name: acquia_cms (${{ matrix.orca-job }})
runs-on: ubuntu-latest
Expand Down Expand Up @@ -204,11 +214,16 @@ jobs:
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_LATEST_LTS" ]; then
# Update common to 2.x for Drupal 9.5
sed -i 's/"dev-develop": "3.x-dev"/"dev-develop": "2.x-dev"/' modules/acquia_cms_common/composer.json
# NEW_JSON=$(composer config extra.patches."drupal/core" | sed -r 's/,?"3328187.*3142.patch"//')
# Remove drupal/core patch as it's needed for latest Drupal Core only.
Expand Down Expand Up @@ -245,6 +260,7 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
blt_test:
name: "BLT site install"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -290,6 +306,9 @@ jobs:
curl https://gist.githubusercontent.com/vishalkhode1/0e26b2e9637722a256c74a6cb8496e9d/raw/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
Expand All @@ -308,6 +327,7 @@ jobs:
../orca/bin/ci/after_success.sh
../orca/bin/ci/after_failure.sh
../orca/bin/ci/after_script.sh
cypress_tests:
name: Cypress Tests with ${{ matrix.orca-job }} on PHP ${{ matrix.php-version }}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -363,6 +383,9 @@ jobs:
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove version from composer.json file.
find modules/* -type f -name "composer.json" -exec sed -i '/"version": "dev-develop",/d' '{}' ';'
sed -i '/"version": "dev-develop",/d' composer.json
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
Expand All @@ -372,6 +395,8 @@ jobs:
# Remove the failing php on Drupal Core 9.5.
if [ "${ORCA_JOB}" = "INTEGRATED_TEST_ON_LATEST_LTS" ]; then
# Update common to 2.x for Drupal 9.5
sed -i 's/"dev-develop": "3.x-dev"/"dev-develop": "2.x-dev"/' modules/acquia_cms_common/composer.json
# NEW_JSON=$(composer config extra.patches."drupal/core" | sed -r 's/,?"3328187.*3142.patch"//')
# Remove drupal/core patch as it's needed for latest Drupal Core only.
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "acquia/acquia_cms",
"description": "An implementation of Drupal 9 for running custom, low code websites on the Acquia platform.",
"homepage": "https://github.com/acquia/acquia_cms",
"version": "2.1.0",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
"authors": [
{
"name": "Michael Sherron",
Expand Down
32 changes: 16 additions & 16 deletions composer.lock

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

4 changes: 2 additions & 2 deletions modules/acquia_cms_audio/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"url": "https://packages.drupal.org/8"
}
},
"minimum-stability": "dev",
"config": {
"allow-plugins": {
"composer/installers": true,
Expand All @@ -34,6 +35,5 @@
"branch-alias": {
"dev-develop": "1.x-dev"
}
},
"minimum-stability": "dev"
}
}
4 changes: 2 additions & 2 deletions modules/acquia_cms_component/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"url": "https://packages.drupal.org/8"
}
},
"minimum-stability": "dev",
"config": {
"allow-plugins": {
"composer/installers": true,
Expand All @@ -37,6 +38,5 @@
},
"enable-patching": true,
"patches": {}
},
"minimum-stability": "dev"
}
}
4 changes: 2 additions & 2 deletions modules/acquia_cms_dam/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"url": "https://packages.drupal.org/8"
}
},
"minimum-stability": "dev",
"config": {
"allow-plugins": {
"composer/installers": true,
Expand All @@ -45,6 +46,5 @@
"branch-alias": {
"dev-develop": "1.x-dev"
}
},
"minimum-stability": "dev"
}
}
Loading

0 comments on commit 54bdcee

Please sign in to comment.