Compare commits
No commits in common. "37fcd2c158a77c13ee52bff548d62e3b7d898c30" and "cc251dc8228e5205bb0f70883868cd0242f95396" have entirely different histories.
37fcd2c158
...
cc251dc822
5 changed files with 63 additions and 6 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:
|
||||||
- pnpm check
|
- ./tool 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:
|
||||||
- pnpm refresh-feeds
|
- ./tool refresh_feeds
|
||||||
- pnpm build
|
- ./tool build
|
||||||
upload:
|
upload:
|
||||||
image: gitea.nulo.in/nulo/super-image:3.18
|
image: gitea.nulo.in/nulo/super-image:3.18
|
||||||
commands:
|
commands:
|
||||||
|
|
23
Justfile
Normal file
23
Justfile
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
default: build
|
||||||
|
|
||||||
|
builder := "gitea.nulo.in/nulo/sitio-build"
|
||||||
|
build_builder_image:
|
||||||
|
podman build -t {{builder}} tooling/
|
||||||
|
_run command: build_builder_image
|
||||||
|
podman run -it --rm \
|
||||||
|
-v ".:/sitio:Z" --workdir /sitio \
|
||||||
|
{{builder}} sh -c "{{command}}"
|
||||||
|
run command: (_run "pnpm install --prefer-offline") (_run command)
|
||||||
|
|
||||||
|
build: (run './tool build')
|
||||||
|
check: (run './tool check')
|
||||||
|
refresh_feeds: (run './tool refresh_feeds')
|
||||||
|
|
||||||
|
clean:
|
||||||
|
if [ ! -z "$(git status --porcelain)" ]; then echo "not clean!"; exit 1; fi
|
||||||
|
|
||||||
|
ready_to_upload: check refresh_feeds
|
||||||
|
upload: clean ready_to_upload _dirty_upload
|
||||||
|
_dirty_upload: build
|
||||||
|
rsync --rsh='ssh -p2223 -J root@dorsiblanco.nulo.in' --recursive --chmod=644 build/ root@localhost:/data/nulo_ar/
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"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-ts": "./tool build_ts",
|
||||||
"check": "tsc",
|
"build": "./tool build",
|
||||||
"refresh-feeds": "node feeds.js refresh"
|
"check": "./tool check"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
28
tool
Executable file
28
tool
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/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"
|
6
tooling/Containerfile
Normal file
6
tooling/Containerfile
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
FROM docker.io/alpine:3.17
|
||||||
|
|
||||||
|
RUN apk add --no-cache nodejs npm icu-data-full \
|
||||||
|
rsync openssh-client-default
|
||||||
|
|
||||||
|
RUN npm install --global pnpm
|
Reference in a new issue