Commit Graph

113 Commits

Author SHA1 Message Date
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
Claudio Sanches 32d2b79e78 Introduced script to generate a zip package 2020-05-07 13:29:59 -03:00
Jeff Stieler 674dbbacac Stop looking for commas and start looking for double quotes. 2020-04-29 15:58:59 -06:00
Peter Fabian f1f02dc292 Remove the patch from PR 450, as it's already included in 3.1.1. 2020-02-25 10:13:56 +01:00
Peter Fabian 0eb758b8e2 Apply patch until a new AS version comes out. 2020-02-07 11:32:33 +01:00
Peter Fabian 87e42acd56
Merge branch 'master' into try/add-wc-admin 2020-02-05 13:02:20 +01:00
Paul Sealock 4380087608 wc-admin: Include package 2020-02-04 16:01:57 -08:00
Peter Fabian b8a6e85936 Included wp_set_script_translations in the list of functions to update domain in. 2020-02-04 15:46:26 +01:00
Peter Fabian a48b2b53c0 Handle PHP files with wp-textdomain, JS files with sed. 2020-02-04 15:45:40 +01:00
Claudio Sanches 7703b56979 Added wp-textdomain to fix Package's text domains 2020-01-30 14:26:14 -03:00
Claudio Sanches ff1763a898 Introduced GIT post-merge hook to update NPM and Composer dependencies 2019-11-20 19:18:39 -03:00
Darren Ethier 2549a8d90c
improve domain replacement for blocks package 2019-09-26 17:24:42 -04:00
Claudio Sanches 802f23d76d Leave pot file for build before release 2019-07-08 15:19:48 -03:00
Claudio Sanches a0defeb684 Prevent package-update.sh to run without installing composer dependencies 2019-07-08 15:17:11 -03:00
Claudio Sanches e64bc772d3 Fixed permissions for bin/package-update.sh 2019-07-08 14:34:19 -03:00
Claudio Sanches fa91edb0dd Use NPM to run Grunt 2019-07-08 14:29:17 -03:00
Mike Jolley 9a8e8dacff Add integration tests 2019-06-25 15:57:44 +01:00
Mike Jolley e46653f3a9 More specific replacement 2019-06-24 15:50:55 +01:00
Mike Jolley fcf06e97a3 Tweak script to add POT generation on update 2019-06-24 15:29:26 +01:00
Mike Jolley dab6e4d257 Handle rest package 2019-06-24 13:02:43 +01:00
Mike Jolley 69c2cbf6e4 Text domain replacement 2019-06-24 12:40:20 +01:00