try CI on tangled.org

This commit is contained in:
2026-02-28 22:07:08 -08:00
parent ea7ba4ea40
commit c26b283899
3 changed files with 30 additions and 4 deletions

View File

@@ -0,0 +1,17 @@
when:
- event: ["push", "manual"]
branch: ["main"]
engine: "nixery"
dependencies:
nixpkgs:
- nodejs
- gnumake
- diffutils
- findutils
- git
- time
steps:
- name: "build newt"
command: "make newt3.js"
- name: "test"
command: "make test"

View File

@@ -9,11 +9,8 @@ RUNJS=node
all: newt.js
REV=$(shell git rev-parse --short HEAD)
src/Revision.newt: .PHONY
echo "module Revision\nimport Prelude\ngitRevision : String\ngitRevision = \"${REV}\"" > src/Revision.newt.new
cmp src/Revision.newt.new src/Revision.newt || cp src/Revision.newt.new src/Revision.newt
rm -f src/Revision.newt.new
sh ./scripts/mkrevision
newt.js: ${SRCS} src/Revision.newt
$(RUNJS) bootstrap/newt.js src/Main.newt -o newt.js

12
scripts/mkrevision Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh -e
REV=$(git rev-parse --short HEAD)
cat >> src/Revision.newt.new <<EOF
module Revision
import Prelude
gitRevision : String
gitRevision = "$REV"
EOF
cmp src/Revision.newt.new src/Revision.newt || cp src/Revision.newt.new src/Revision.newt
rm -f src/Revision.newt.new