This commit is contained in:
parent
35109f683a
commit
37fcd2c158
3 changed files with 6 additions and 34 deletions
|
@ -6,15 +6,15 @@ pipeline:
|
||||||
check:
|
check:
|
||||||
image: gitea.nulo.in/nulo/super-image:3.18
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
commands:
|
commands:
|
||||||
- ./tool check
|
- pnpm check
|
||||||
when:
|
when:
|
||||||
path:
|
path:
|
||||||
include: ["*.js", "*.ts", "package.json", "pnpm-lock.yaml", "tsconfig.json"]
|
include: ["*.js", "*.ts", "package.json", "pnpm-lock.yaml", "tsconfig.json"]
|
||||||
build:
|
build:
|
||||||
image: gitea.nulo.in/nulo/super-image:3.18
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
commands:
|
commands:
|
||||||
- ./tool refresh_feeds
|
- pnpm refresh-feeds
|
||||||
- ./tool build
|
- pnpm build
|
||||||
upload:
|
upload:
|
||||||
image: gitea.nulo.in/nulo/super-image:3.18
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
commands:
|
commands:
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build-ts": "./tool build_ts",
|
"build": "esbuild compilar.ts --target=node18 --outdir=build.js --sourcemap && cp *.js build.js/ && node --enable-source-maps --trace-uncaught build.js/compilar.js",
|
||||||
"build": "./tool build",
|
"check": "tsc",
|
||||||
"check": "./tool check"
|
"refresh-feeds": "node feeds.js refresh"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
28
tool
28
tool
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
build_ts() {
|
|
||||||
./node_modules/.bin/esbuild compilar.ts --target=node18 --outdir=build.js --sourcemap || exit $?
|
|
||||||
cp *.js build.js/
|
|
||||||
}
|
|
||||||
build() {
|
|
||||||
build_ts
|
|
||||||
node --enable-source-maps --trace-uncaught build.js/compilar.js || exit $?
|
|
||||||
}
|
|
||||||
check() {
|
|
||||||
./node_modules/.bin/tsc --noEmit || exit $?
|
|
||||||
}
|
|
||||||
refresh_feeds() {
|
|
||||||
node feeds.js refresh
|
|
||||||
}
|
|
||||||
|
|
||||||
fatal() {
|
|
||||||
echo "$1"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
test "$1" = build_ts \
|
|
||||||
-o "$1" = build \
|
|
||||||
-o "$1" = check \
|
|
||||||
-o "$1" = refresh_feeds \
|
|
||||||
|| fatal "Comando no válido"
|
|
||||||
"$1"
|
|
Reference in a new issue