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 e91df6c
Show file tree
Hide file tree
Showing 18 changed files with 74 additions and 18 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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"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",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"authors": [
Expand Down
30 changes: 15 additions & 15 deletions composer.lock

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

1 change: 1 addition & 0 deletions modules/acquia_cms_audio/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_audio",
"description": "Provides an Audio media type and related configuration.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_component/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_component",
"description": "Provides component and related configuration for Acquia CMS.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_dam/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_dam",
"description": "Provides an Acquia DAM related configuration.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_headless/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_headless",
"description": "Provides a Headless/Decoupled functionality for Acquia CMS.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_image/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_image",
"description": "Provides an Image media type and related configuration.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_person/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_person",
"description": "Provides a Person content type, a structured data representation of people associated with a website or organization.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_place/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_place",
"description": "Provides a Place content type and related configuration.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_search/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_search",
"description": "Provides powerful search capabilities to the site.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
1 change: 1 addition & 0 deletions modules/acquia_cms_site_studio/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "drupal/acquia_cms_site_studio",
"description": "Handles code for Site Studio Installation & Related Configurations.",
"version": "dev-develop",
"license": "GPL-2.0-or-later",
"type": "drupal-module",
"version": "dev-develop",
Expand Down
Loading

0 comments on commit e91df6c

Please sign in to comment.