Skip to content

Commit 74462ec

Browse files
committed
Remove irrelevant code from release branches.
1 parent 43d7919 commit 74462ec

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

scripts/commons.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ const extraneousFiles = [
66
"bin",
77
"imgs",
88
"test",
9-
"vendor",
109
'node_modules',
1110
"coverage",
11+
"scripts",
1212
".travis.yml",
1313
"Changelog.md",
1414
"composer.lock",
15+
"composer.json",
16+
"package.json",
1517
"package-lock.json",
1618
"ScreenCast.md",
1719
"Todo.md",

scripts/release.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ async function release(releaseLevel) {
1717
"Switching to the release branch"
1818
);
1919

20-
// remove files that we don't need in the production code
21-
await execute("rm", ["-rf", ...extraneousFiles], "Removing extraneous files");
22-
23-
// we removed all the vendor code in the previous step
24-
// now we install it again, but only the production dependencies.
20+
// remove all php vendor code except the required for production
21+
await execute("rm", ["-rf", "vendor"], "Removing extraneous files");
2522
await execute(
2623
"composer",
2724
["install", "--no-dev"],
2825
"Installing php dependencies (--no-dev)"
2926
);
3027

28+
// remove the rest of the files that we don't need in the production code
29+
await execute("rm", ["-rf", ...extraneousFiles], "Removing extraneous files");
30+
3131
// remove verdor's files that we don't use in production code
3232
await execute(
3333
"rm",
@@ -54,7 +54,7 @@ async function release(releaseLevel) {
5454
]);
5555

5656
// version tag
57-
await execute("npm", ["version", releaseLevel], "Tagging the release.");
57+
await execute("git", ["tag", `v${releaseLevel}`], "Tagging the release.");
5858

5959
// switch back to master
6060
await execute(
@@ -71,7 +71,7 @@ async function release(releaseLevel) {
7171
);
7272

7373
// install all deps back
74-
await execute("composer", ["install"], "Install all vendor deps back.");
74+
await execute("npm", ["install"], "Install all vendor deps back.");
7575

7676
// update package.json version
7777
await execute(

0 commit comments

Comments
 (0)