Skip to content

Commit 7d441cb

Browse files
committed
Don't include src-github in builds
We aren't actually using these anywhere yet, and I want to refactor the build without the extra complexity. I will probably add these back eventually using a different method.
1 parent f39b5c2 commit 7d441cb

File tree

3 files changed

+4
-16
lines changed

3 files changed

+4
-16
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@
6969
},
7070
"scripts": {
7171
"phpstan": "php -d memory_limit=-1 ./vendor/bin/phpstan analyse",
72-
"phpcbf": "php ./vendor/bin/phpcbf -d memory_limit=512M --standard=./phpcs.xml --extensions=php src src-github tests views *.php",
73-
"phpcs": "php ./vendor/bin/phpcs -d memory_limit=512M -s --standard=./phpcs.xml --extensions=php src src-github tests views *.php",
72+
"phpcbf": "php ./vendor/bin/phpcbf -d memory_limit=512M --standard=./phpcs.xml --extensions=php src tests views *.php",
73+
"phpcs": "php ./vendor/bin/phpcs -d memory_limit=512M -s --standard=./phpcs.xml --extensions=php src tests views *.php",
7474
"lint": "php ./vendor/bin/parallel-lint --exclude integration-tests --exclude vendor .",
7575
"rector": "php ./vendor/bin/rector --debug",
7676
"test": [

flake.nix

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
pname = "${name}-composer-deps";
2525
version = "1.0.0";
2626
src = composerSrc;
27-
vendorHash = "sha256-4eHxmlB7KQsEn1gCTGPJzklnYTrRzpI+Pt8ccrl7Jkc=";
27+
vendorHash = "sha256-c7zv3Wprd5rSeDpRLcfBkMEADDrJP5O0XKYQOIk1mSM=";
2828
});
2929
composerVendorDev = php.mkComposerVendor (finalAttrs: {
3030
composerNoDev = false;
3131
pname = "${name}-composer-deps-dev";
3232
version = "1.0.0";
3333
src = composerSrc;
34-
vendorHash = "sha256-4M4bKmJMZyM+DMVIUwKdbhC6rI+xIDtAtWHu1l9JAS4=";
34+
vendorHash = "sha256-WJ3zfADVJQTLeWLlDBTX34O90SHxLTgIy1nvqUqPIfE=";
3535
});
3636
staticDeploySrc = pkgs.lib.cleanSourceWith {
3737
src = self;
@@ -46,14 +46,6 @@
4646
&& pkgs.lib.hasSuffix ".php" base || base == "composer.json" || base
4747
== "composer.lock" || base == "phpcs.xml" || base == "phpunit.xml";
4848
};
49-
# Sources used for GitHub releases but not for WordPress.org
50-
staticDeploySrcGitHub = pkgs.lib.cleanSourceWith {
51-
src = self;
52-
filter = path: type:
53-
let base = baseNameOf path;
54-
in type == "directory" && base == "src-github"
55-
|| pkgs.lib.hasInfix "/src-github/" path;
56-
};
5749
wpOrgExtras = pkgs.lib.cleanSourceWith {
5850
src = self;
5951
filter = path: type:
@@ -71,7 +63,6 @@
7163
7264
# Lock certain constants and run rector to remove dead code
7365
cp ${wpOrgExtras}/wp-org/constants.php constants.php
74-
mkdir src-github # Prevent an error
7566
composer rector
7667
7768
mkdir -p "$out"
@@ -85,7 +76,6 @@
8576
cd "$PLUGIN_DIR"
8677
cp -r --no-preserve=mode "${composerVendor}"/* .
8778
cp -r --no-preserve=mode "${staticDeploySrc}"/* .
88-
cp -r --no-preserve=mode "${staticDeploySrcGitHub}"/src-github/* ./src
8979
${phpPackages.composer}/bin/composer dump-autoload --no-dev --optimize
9080
rm composer.json composer.lock
9181
mkdir -p $out
@@ -113,7 +103,6 @@
113103
cd "$PLUGIN_DIR"
114104
cp -a "${composerVendorDev}/vendor" .
115105
cp -r --no-preserve=mode "$src"/* .
116-
cp -a "${staticDeploySrcGitHub}"/* .
117106
composer lint
118107
composer phpcs
119108
# Run directly because composer swallows the exit code

rector.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
->withPaths(
2222
[
2323
__DIR__ . '/src',
24-
__DIR__ . '/src-github',
2524
__DIR__ . '/tests',
2625
__DIR__ . '/views',
2726
]

0 commit comments

Comments
 (0)