Update server platforms to v2 paths #465
4
.github/dependabot.yml
vendored
4
.github/dependabot.yml
vendored
@@ -8,4 +8,6 @@ updates:
|
|||||||
- package-ecosystem: npm
|
- package-ecosystem: npm
|
||||||
directory: /
|
directory: /
|
||||||
schedule:
|
schedule:
|
||||||
interval: daily
|
interval: monthly
|
||||||
|
assignees:
|
||||||
|
- Sirherobrine23
|
||||||
|
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
@@ -20,6 +20,8 @@ jobs:
|
|||||||
- Spigot
|
- Spigot
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: "${{ matrix.platform }}"
|
name: "${{ matrix.platform }}"
|
||||||
|
env:
|
||||||
|
BDS_HOME: "~/.bdsCore"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
name: Code checkout
|
name: Code checkout
|
||||||
@@ -51,3 +53,14 @@ jobs:
|
|||||||
# Run test
|
# Run test
|
||||||
- name: Test
|
- name: Test
|
||||||
run: npm run test:partial -- tests/${{ matrix.platform }}.ts
|
run: npm run test:partial -- tests/${{ matrix.platform }}.ts
|
||||||
|
|
||||||
|
# Upload bds root
|
||||||
|
- name: Upload BdsCore folder
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.platform }}
|
||||||
|
path: |
|
||||||
|
~/.bdsCore
|
||||||
|
!~/.bdsCore/**/*.debug
|
||||||
|
!~/.bdsCore/**/bedrock_server
|
||||||
|
!~/.bdsCore/**/*_packs/
|
@@ -1,10 +0,0 @@
|
|||||||
import { installServer, startServer } from "../src/pocketmine";
|
|
||||||
|
|
||||||
(async function(){
|
|
||||||
await installServer("latest");
|
|
||||||
const serverManeger = await startServer();
|
|
||||||
serverManeger.on("log", console.log);
|
|
||||||
serverManeger.on("portListening", console.log);
|
|
||||||
serverManeger.on("serverStarted", () => serverManeger.stopServer());
|
|
||||||
return serverManeger.waitExit();
|
|
||||||
})().catch(err => console.trace(err));
|
|
@@ -3,7 +3,11 @@ import path from "node:path";
|
|||||||
import fs from "node:fs/promises";
|
import fs from "node:fs/promises";
|
||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
|
|
||||||
export const bdsRoot = process.env.BDS_HOME||path.join(os.homedir(), ".bdsManeger");
|
export let bdsRoot = path.join(os.homedir(), ".bdsManeger");
|
||||||
|
if (process.env.BDS_HOME) {
|
||||||
|
if (process.env.BDS_HOME.startsWith("~")) process.env.BDS_HOME = process.env.BDS_HOME.replace("~", os.homedir());
|
||||||
|
bdsRoot = process.env.BDS_HOME;
|
||||||
|
}
|
||||||
async function exists(filePath: string) {
|
async function exists(filePath: string) {
|
||||||
return fs.access(filePath).then(() => true).catch((() => false));
|
return fs.access(filePath).then(() => true).catch((() => false));
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user