Commit Graph

70 Commits

Author SHA1 Message Date
Vedanshu Jain 6b862e12e5
Merge pull request #28940 from woocommerce/install-e2e-only-explicitly
Improve the WooCommerce build process
2021-02-10 16:26:04 +05:30
Claudio Sanches 0131210907 Update composer dependencies 2021-02-03 18:10:05 -03:00
Nestor Soriano 1b04bedd3d Exclude e2e infrastructure from the zip build process
Use the new "install:no-e2e" script instead of "npm install"
for building the zip file.
2021-01-27 16:59:31 +01:00
Nestor Soriano 63c2b434d2 Don't update text domains on the post-merge hook. 2021-01-27 16:48:25 +01:00
Nestor Soriano f239075b2f Improve the nmp setup process to install e2e tests only explicitly
Use the "install-subset" package to define a subset of the nmp
dependencies that doesn't include the e2e testing infrastructure.
Also define a new npm "install:no-e2e" command, and modify the
post-merge hook to use it instead of the full install.
2021-01-26 12:23:24 +01:00
Paul Sealock f7cc34779a update wc-admin to 1.9.0-rc.3 2021-01-22 23:44:27 +13:00
vedanshujain f8121b9589 Update composer lock to not include additional components. 2020-12-23 14:32:08 +05:30
Paul Sealock ecbb127880 update wc-admin 1.8.2 2020-12-23 15:26:04 +13:00
Mike Jolley 6208fc3d27 Update WooCommerce Blocks package to 4.0.0 2020-12-08 15:18:54 +00:00
Timmy Crawford 098d654dd4 Update woocomerce-admin to 1.7.3 2020-12-03 13:26:44 -08:00
Darren Ethier 8ffa39b78f
bump wc-blocks package to 3.8.1 2020-11-23 16:09:57 -05:00
Nestor Soriano 16bd67688f Remove "pushd" and "popd" from build-lib.sh
These are bash specific commands and will fail since the script is
actually run as a sh script. Instead, the "-d" option of composer
is now used.
2020-11-19 09:25:48 +01:00
Christopher Allford e9dfe64f9f Replaced the local repository with root autoload definitions
Since Composer can't recursively use repositories, we can't actually use a local package to deal with this. We're going to keep the local package to separate the dependencies but we need to add autoload keys in the root package's `composer.json`
2020-11-18 15:31:54 -08:00
Christopher Allford c9f413d297 Created dummy `woocommerce/woocommerce-lib` package to contain dependencies
In order to avoid problems posed by potentially including the unconverted dependencies in the root autoloader, this package will hold all dependencies that require conflict avoidance.
2020-11-18 13:54:20 -08:00
Nestor Soriano 846a7fb3d1 Declare PHP version as 7.2 in composer.json for Mozart.
This way it won't throw errors when building in 7.0 or 7.1
(required for CI). Still, an error will be thrown when manually
running move-vendor-packages.sh in 7.0 or 7.1.
2020-11-18 09:39:46 +01:00
Nestor Soriano f296b36667 Get Mozart package from original source instead of our fork.
Since the pull requests with required functionality have been accepted
and merged, we can now use the original repository instead of
Woo's fork.
2020-11-18 09:14:17 +01:00
Nestor Soriano 556ea1ecfa Merge branch 'master' into use-mozart-to-renamespace-dependencies 2020-11-18 09:05:11 +01:00
Christopher Allford 84c8bc4afa Corrected `composer.json` PHP minimums to 7.0 to ensure compatibility in Travis 2020-11-12 12:25:52 -08:00
Christopher Allford b22268c754 Updated to Composer v2
This also updates the woocommerce/woocommerce-admin and woocommerce/woocommerce-blocks packages as their dependence on `composer/installers` precludes update otherwise
2020-11-11 13:45:51 -08:00
Nestor Soriano 8bb0f196e6 Change the strategy for moving packages
Since the Mozart package requires PHP 7.2, and we need to support 7.0
and 7.1, the moving step has been removed from the composer install
stage. Instead, now it has to be triggered manually via
`composer run move-vendor-namespaces`, and the moved package must be
added to source control. See the updated src/Internal/Vendor/REAMDE.md
for details.
2020-11-05 17:19:14 +01:00
Nestor Soriano 96fce186e7 Use Mozart instead of a script to renamespace packages.
A custom fork of the coenjacobs/mozart package is now used to change
the namespace of the appropriate packages (only league/container
for now) instead of the previously used prefix-vendor-namespaces script.

The packages are now moved to the src/Internal/Vendor namespace instead
of being modified in-place in the vendor directory. The namespaces
are thus now prefixed with Automattic\WooCommerce\Internal\Vendor
(previously it was just Automattic\WooCommerce\Vendor).
2020-10-30 12:28:26 +01:00
Claudio Sanches 0fea7e8e58
Updated phpcs and phpunit composer.lock (#28096)
* Fix build on Travis
2020-10-28 16:31:43 -03:00
Timmy Crawford 0c40758f5e Updates wc-admin to 1.6.3 2020-10-26 13:35:24 -07:00
Rodrigo Primo 9f22f10861 Fix error in the sed commands used to prefix namespaces
This commit fixes a minor error in the sed commands used to prefix
namespaces in the vendor folder. Due to an extra space sed was
considering `.bak` an extra parameter. If we use `-i.bak` instead (without the
space), sed creates a backup file which is the desired behavior.

With this change we won't be getting the errors below when running
`composer install` or `composer update`:

```
Generating autoload files
> sh ./bin/prefix-vendor-namespaces.sh
Prefixing the appropriate vendor namespaces with Automattic\WooCommerce\Vendor
sed: can't read .bak: No such file or directory
sed: can't read .bak: No such file or directory
sed: can't read .bak: No such file or directory
(...)
```

Since sed was working without creating a backup file, I wonder if we
really need to create one. I tested and `sed -i -E -e
"s/\"(League\\\\\\\Container)/\"Automattic\\\\\\\WooCommerce\\\\\\\Vendor\\\\\\\\\1/g"
vendor/league/container/composer.json` works well in Linux. If it also
works on Mac, maybe we can use it and remove the code that deletes the
.bak files?
2020-10-21 09:26:30 -03:00
Claudio Sanches e6e199fb7e Update composer.lock 2020-10-19 23:37:27 -03:00
Claudio Sanches 02d622642e
Merge pull request #27944 from woocommerce/update/contributors-sh-list-of-ignored-users
Add github-actions[bot] to the list of ignored users
2020-10-14 11:54:21 -03:00
Rodrigo Primo f4316a0e9f Add github-actions[bot] to the list of ignored users
This commit simply adds github-actions[bot] (a bot used in the
woocommerce-blocks repository) to the list of users ignored
by the bin/contributors.sh script.
2020-10-13 11:47:49 -03:00
Rodrigo Primo 9c943aaf1f Remove woocommerce-rest-api from contributors.sh
Now that woocommerce-rest-api was merged back into the WC core
repository, we don't need to check contributions in the depreacted
woocommerce-rest-api repository.
2020-10-13 11:39:28 -03:00
Timmy Crawford 58f181e351 Update WooCommerce Admin to 1.6.0 2020-10-09 14:15:42 -07:00
Nestor Soriano a621f07a96 Merge branch 'master' into add/composer-bin-plugin 2020-10-08 12:27:28 +02:00
Nestor Soriano 62aaa3f73a De-refactor the output function in scripts 2020-10-08 09:28:05 +02:00
Nestor Soriano d687c0c919 Improvements on prefix-vendor-namespaces.sh
- Prefix also Container's composer.json
- Use one single variant for sed, creating a backup file and
  later deleting it
2020-10-08 09:28:05 +02:00
Nestor Soriano fcd9b115ca Adjust the namespace prefixing script to macOS/Linux
Both OSes have a slightly different syntax for "sed -i" and therefore
two versions of the command are needed.
2020-10-08 09:28:05 +02:00
Nestor Soriano 97618d8fad Reintroduce the League's Container package, and prefix it.
All the classes in the package are re-namespaced from
"Leage\Container" to "Automattic\WooCommerce\Vendor\League\Container"
to prevent conflicts with extensions using the same plugin.

The re-namespacing is done by using a simple text substitution
on all the code files (see prefix-vendor-namespaces.sh), for this
particular case this approach is enough.
2020-10-08 09:28:01 +02:00
Christopher Allford b3da18a14b Merge branch 'master' into add/composer-bin-plugin 2020-10-06 10:13:47 -07:00
Christopher Allford 5ec004cada Added appropriate platform constraints to bin packages 2020-09-24 11:54:59 -07:00
Rodrigo Primo 6e61398c83 Fix pre-push hook used by husky
The pre-push hook uses sh but contained syntax that is only supported by
bash. `=` in sh should be used instead of `==` to check for string
equality. Before this change, we were getting the following error when
pushing to any branch:

```
git push
husky > pre-push (node v10.22.1)
./bin/pre-push.sh: 7: [: refs/heads/master: unexpected operator
```

This error didn't block the push, but meant that the message asking
developers to confirm if they wanted to push to master was never
displayed. This problem was introduced in commit
8c25557bf5 added in PR #27028.
2020-09-23 10:42:23 -03:00
Christopher Allford ef612f60e5 Moved the PHP code sniffs into a bin folder 2020-09-22 11:55:24 -07:00
Christopher Allford f81a25c398 Moved all of the composer binary commands into the `composer-bin-plugin` to avoid version compatibility errors 2020-09-22 11:44:27 -07:00
Rodrigo Primo ac4c057740 Fix post-merge.sh exit status in some cases
This commit tweaks the function runOnChange() to make sure it always
returns the correct exit status. Before this change, this function would
return 1 instead of 0 when there was no change to composer.lock and
package-lock.json in the commits that were merged. This resulted in
husky mistakenly reporting a failure when actually the post-merge script
succeeded.
2020-09-18 15:46:58 -03:00
Claudio Sanches c59f1db2e8 Improved bin/build-zip.sh script to move zip file to root 2020-08-12 16:51:56 -03:00
Peter Fabian 74c320575d Add message to GUI clients. 2020-07-14 12:53:22 +02:00
Peter Fabian 8c25557bf5 Fixed the test to actually catch master. 2020-07-14 12:51:50 +02:00
Peter Fabian e111b57a86 Removed wildcards from branch name match.
Otherwise branches like 'fix/update-master-branch' will be protected as well.
2020-07-13 15:04:45 +02:00
Christopher Allford 05adbd718d
Merge pull request #26742 from woocommerce/update/git-hook-pre-push
Added pre-push hook to prevent accidental pushes to master
2020-06-21 11:28:00 -07:00
Claudio Sanches feada5e092 Make pre-push compatible with multiple environments 2020-06-10 01:20:15 -03:00
Claudio Sanches d3b8e4f66a Added pre-push hook to prevent accidental pushes to master 2020-06-10 00:40:48 -03:00
Peter Fabian f508577027 Translate wc admin domain also in Blocks package. 2020-06-04 12:39:26 +02:00
Claudio Sanches 919276fd90
Merge pull request #26403 from woocommerce/update/add-contributors-from-pkgs
Added packages to list of contributors.
2020-06-02 19:00:42 -03:00
Peter Fabian 80eb5ae931 Moved the contributors script from Grunt to bash. 2020-05-11 11:00:42 +02:00