git.s-ol.nu alive / dd02ee9
merge dist/pack and dist/release s-ol 1 year, 2 months ago
4 changed file(s) with 44 addition(s) and 56 deletion(s). Raw diff Collapse all Expand all
66 ARGS=$*
77 FIFO=$tmpdir/fifo
88 CONF=$tmpdir/conf
9 LIBDIR=$(dirname "$0")
10 LUA_PATH="$LIBDIR/?.lua;$LIBDIR/?/init.lua;$LUA_PATH"
119
1210 cat > "$CONF" << 'EOF'
1311 split
1412 focus
1513 screen -t evaltime sh -c 'tty > "$FIFO"; read done < "$FIFO"'
1614 focus
17 screen -t runtime sh -c 'read tty < "$FIFO"; moon "$LIBDIR/alv/copilot.moon" $ARGS 2> "$tty"; echo "[press enter to exit]"; read prompt; echo done > "$FIFO"'
15 screen -t runtime sh -c 'read tty < "$FIFO"; "alv" $ARGS 2> "$tty"; echo "[press enter to exit]"; read prompt; echo done > "$FIFO"'
1816 EOF
1917
2018 mkfifo "$FIFO"
21 export FIFO ARGS LIBDIR LUA_PATH
19 export FIFO ARGS
2220 exec screen -mc "$CONF"
+0
-17
dist/pack.sh less more
0 #!/bin/sh
1 set -e
2
3 TAG="$1"
4 REVISION="${2:-1}"
5
6 VERSION="${TAG#v}"
7 VERSION=$(echo "$VERSION" | tr -d -)
8 ROCKVER="$VERSION-$REVISION"
9
10 luarocks build "dist/rocks/alive-$ROCKVER.rockspec" \
11 --pack-binary-rock \
12 --sign \
13 --pin
14 mv "alive-$ROCKVER.all.rock" "alive-$ROCKVER.all.rock.asc" dist/rocks
15
16 dist/pack-win.sh "$TAG" "$ROCKVER"
33 TAG="${1:-scm}"
44 REVISION="${2:-1}"
55
6 if [ "$VERSION" = scm ]; then
7 WHERE=
8 TAG=
6 if [ "$TAG" = scm ]; then
7 WHERE=""
8 TAG=""
99 VERSION="scm"
1010 else
1111 VERSION="${TAG#v}"
4141 fi
4242
4343 list_modules() {
44 find "$1" -type f -name '*.moon' -exec sh -c '
45 MODULE=$(echo "$1" | sed -e "s/\.moon$//" -e "s/\//./g")
46 echo " [\"$MODULE\"] = \"$1\","
47 ' sh {} \;
44 for FILE in $(git ls-files "$1" | grep '\.moon$'); do
45 MODULE=$(echo "$FILE" | sed -e "s/\.moon$//" -e "s/\//./g")
46 echo " [\"$MODULE\"] = \"$FILE\","
47 done
4848 }
4949
5050 cat <<STOP >"dist/rocks/alive-$VERSION-$REVISION.rockspec"
9999 git add "alv/version.moon" "dist/rocks/alive-$VERSION-$REVISION.rockspec"
100100 git commit -m "release $TAG"
101101 git tag -am "version $TAG" "$TAG"
102
103 luarocks make "dist/rocks/alive-$VERSION-$REVISION.rockspec" \
104 --pack-binary-rock \
105 --sign \
106 --pin
107 mv "alive-$VERSION-$REVISION.all.rock" "alive-$VERSION-$REVISION.all.rock.asc" dist/rocks
108 dist/pack-win.sh "$TAG" "$VERSION-$REVISION"
102109 fi
3232 copy_directories = { "docs" },
3333 install = {
3434 lua = {
35 ["alv.ast"] = "alv/ast.moon",
36 ["alv.base.builtin"] = "alv/base/builtin.moon",
37 ["alv.base.fndef"] = "alv/base/fndef.moon",
38 ["alv.base.init"] = "alv/base/init.moon",
39 ["alv.base.input"] = "alv/base/input.moon",
40 ["alv.base.match"] = "alv/base/match.moon",
41 ["alv.base.op"] = "alv/base/op.moon",
42 ["alv.builtin"] = "alv/builtin.moon",
43 ["alv.cell"] = "alv/cell.moon",
44 ["alv.copilot"] = "alv/copilot.moon",
45 ["alv.cycle"] = "alv/cycle.moon",
46 ["alv.error"] = "alv/error.moon",
47 ["alv.init"] = "alv/init.moon",
48 ["alv.invoke"] = "alv/invoke.moon",
49 ["alv.logger"] = "alv/logger.moon",
50 ["alv.parsing"] = "alv/parsing.moon",
51 ["alv.registry"] = "alv/registry.moon",
3552 ["alv.result"] = "alv/result.moon",
36 ["alv.stream.io"] = "alv/stream/io.moon",
53 ["alv.scope"] = "alv/scope.moon",
3754 ["alv.stream.base"] = "alv/stream/base.moon",
38 ["alv.stream.value"] = "alv/stream/value.moon",
3955 ["alv.stream.event"] = "alv/stream/event.moon",
4056 ["alv.stream.init"] = "alv/stream/init.moon",
41 ["alv.builtin"] = "alv/builtin.moon",
42 ["alv.cell"] = "alv/cell.moon",
57 ["alv.stream.io"] = "alv/stream/io.moon",
58 ["alv.stream.value"] = "alv/stream/value.moon",
4359 ["alv.tag"] = "alv/tag.moon",
44 ["alv.copilot"] = "alv/copilot.moon",
4560 ["alv.version"] = "alv/version.moon",
46 ["alv.error"] = "alv/error.moon",
47 ["alv.invoke"] = "alv/invoke.moon",
48 ["alv.cycle"] = "alv/cycle.moon",
49 ["alv.ast"] = "alv/ast.moon",
50 ["alv.base.builtin"] = "alv/base/builtin.moon",
51 ["alv.base.op"] = "alv/base/op.moon",
52 ["alv.base.fndef"] = "alv/base/fndef.moon",
53 ["alv.base.match"] = "alv/base/match.moon",
54 ["alv.base.input"] = "alv/base/input.moon",
55 ["alv.base.init"] = "alv/base/init.moon",
56 ["alv.registry"] = "alv/registry.moon",
57 ["alv.logger"] = "alv/logger.moon",
58 ["alv.init"] = "alv/init.moon",
59 ["alv.parsing"] = "alv/parsing.moon",
60 ["alv.scope"] = "alv/scope.moon",
6161
62 ["alv-lib.logic"] = "alv-lib/logic.moon",
63 ["alv-lib.math"] = "alv-lib/math.moon",
64 ["alv-lib.midi"] = "alv-lib/midi.moon",
65 ["alv-lib.midi.core"] = "alv-lib/midi/core.moon",
66 ["alv-lib.midi.launchctl"] = "alv-lib/midi/launchctl.moon",
6267 ["alv-lib.osc"] = "alv-lib/osc.moon",
63 ["alv-lib.midi"] = "alv-lib/midi.moon",
64 ["alv-lib.sc"] = "alv-lib/sc.moon",
6568 ["alv-lib.pilot"] = "alv-lib/pilot.moon",
6669 ["alv-lib.random"] = "alv-lib/random.moon",
70 ["alv-lib.sc"] = "alv-lib/sc.moon",
71 ["alv-lib.string"] = "alv-lib/string.moon",
72 ["alv-lib.time"] = "alv-lib/time.moon",
6773 ["alv-lib.util"] = "alv-lib/util.moon",
68 ["alv-lib.string"] = "alv-lib/string.moon",
69 ["alv-lib.midi.launchctl"] = "alv-lib/midi/launchctl.moon",
70 ["alv-lib.midi.core"] = "alv-lib/midi/core.moon",
71 ["alv-lib.time"] = "alv-lib/time.moon",
72 ["alv-lib.logic"] = "alv-lib/logic.moon",
73 ["alv-lib.math"] = "alv-lib/math.moon",
7474 },
7575 bin = {
7676 "bin/alv",