Skip to content

Commit

Permalink
Fix Nightly Builds (Nomi-CEu#861)
Browse files Browse the repository at this point in the history
[SKIP]
  • Loading branch information
IntegerLimit authored Aug 4, 2024
1 parent 6206285 commit c6a6e17
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 189 deletions.
139 changes: 0 additions & 139 deletions tools/package-lock.json

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

1 change: 0 additions & 1 deletion tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
"filesize": "^10.1.1",
"gray-matter": "^4.0.3",
"gulp": "^5.0.0",
"gulp-filter": "^9.0.1",
"gulp-rename": "^2.0.0",
"gulp-zip": "^6.0.0",
"inquirer": "^9.2.20",
Expand Down
35 changes: 15 additions & 20 deletions tools/tasks/client/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import gulp, { dest, symlink } from "gulp";
import { src, dest, series } from "gulp";
import {
clientDestDirectory,
modpackManifest,
Expand All @@ -11,7 +11,6 @@ import { deleteAsync } from "del";
import { createModList, ModFileInfo } from "../misc/createModList.ts";
import dedent from "dedent-js";
import { cleanupVersion } from "#utils/util.ts";
import filter from "gulp-filter";

async function clientCleanUp() {
return deleteAsync(upath.join(clientDestDirectory, "*"), { force: true });
Expand Down Expand Up @@ -65,41 +64,37 @@ async function exportModpackManifest() {
* Copies the license file.
*/
async function copyClientLicense() {
return gulp.src("../LICENSE").pipe(gulp.dest(clientDestDirectory));
return src("../LICENSE").pipe(dest(clientDestDirectory));
}

/**
* Copies the update notes file.
*/
function copyClientUpdateNotes() {
return gulp
.src("../UPDATENOTES.md", { allowEmpty: true })
.pipe(gulp.dest(clientDestDirectory));
return src("../UPDATENOTES.md", { allowEmpty: true }).pipe(
dest(clientDestDirectory),
);
}

/**
* Copies the changelog file.
*/
function copyClientChangelog() {
return gulp
.src(upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"))
.pipe(dest(clientDestDirectory));
return src(
upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"),
).pipe(dest(clientDestDirectory));
}

/**
* Copies modpack overrides.
*/
function copyClientOverrides() {
const f = filter((f) => !f.isDirectory());
return gulp
.src(buildConfig.copyFromSharedClientGlobs, {
cwd: sharedDestDirectory,
allowEmpty: true,
resolveSymlinks: true,
encoding: false,
})
.pipe(f)
.pipe(symlink(upath.join(clientDestDirectory, "overrides")));
return src(buildConfig.copyFromSharedClientGlobs, {
cwd: sharedDestDirectory,
allowEmpty: true,
resolveSymlinks: true,
encoding: false,
}).pipe(dest(upath.join(clientDestDirectory, "overrides")));
}

/**
Expand Down Expand Up @@ -224,7 +219,7 @@ function getTickCross(bool: boolean): string {
return '<td class="redCross">&#10006;</td>';
}

export default gulp.series(
export default series(
clientCleanUp,
createClientDirs,
copyClientOverrides,
Expand Down
27 changes: 10 additions & 17 deletions tools/tasks/mmc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import {
} from "#globals";
import * as upath from "upath";
import * as fs from "fs";
import gulp, { series, src, symlink } from "gulp";
import { dest, series, src } from "gulp";
import buildConfig from "#buildConfig";
import filter from "gulp-filter";

async function mmcCleanUp() {
if (fs.existsSync(mmcDestDirectory)) {
Expand All @@ -29,37 +28,34 @@ async function createMMCDirs() {
* Copies the update notes file.
*/
function copyMMCUpdateNotes() {
return gulp
.src("../UPDATENOTES.md", { allowEmpty: true })
.pipe(gulp.dest(mmcDestDirectory));
return src("../UPDATENOTES.md", { allowEmpty: true }).pipe(
dest(mmcDestDirectory),
);
}

/**
* Copies the license file.
*/
async function copyMMCLicense() {
return gulp.src("../LICENSE").pipe(gulp.dest(mmcDestDirectory));
return src("../LICENSE").pipe(dest(mmcDestDirectory));
}

/**
* Copies the changelog file.
*/
function copyMMCChangelog() {
return gulp
.src(upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"))
.pipe(gulp.dest(mmcDestDirectory));
return src(
upath.join(buildConfig.buildDestinationDirectory, "CHANGELOG.md"),
).pipe(dest(mmcDestDirectory));
}

/**
* Copies modpack overrides.
*/
function copyOverrides() {
const f = filter((f) => !f.isDirectory());
return src(upath.join(clientDestDirectory, "**/*"), {
resolveSymlinks: false,
})
.pipe(f)
.pipe(symlink(upath.join(mmcDestDirectory)));
}).pipe(dest(upath.join(mmcDestDirectory)));
}

/**
Expand All @@ -77,14 +73,11 @@ async function renameOverrides() {
* Copies client & shared mods.
*/
async function copyMMCModJars() {
const f = filter((f) => !f.isDirectory());
return src(["*", upath.join("client", "*")], {
cwd: modDestDirectory,
resolveSymlinks: true,
encoding: false,
})
.pipe(f)
.pipe(symlink(upath.join(mmcDestDirectory, ".minecraft", "mods")));
}).pipe(dest(upath.join(mmcDestDirectory, ".minecraft", "mods")));
}

async function createMMCConfig() {
Expand Down
Loading

0 comments on commit c6a6e17

Please sign in to comment.