git.s-ol.nu alive / a4e0a27
add some windows dist pieces s-ol 1 year, 2 months ago
5 changed file(s) with 167 addition(s) and 89 deletion(s). Raw diff Collapse all Expand all
0 *.zip
1 deps
0 #!/bin/sh
1
2 VERSION="$1"
3 BUNDLE="alive-$VERSION-win"
4
5 set -e
6
7 if [ -d "dist/$BUNDLE.zip" ]; then
8 echo "dist/$BUNDLE.zip already exists!"
9 exit 2
10 fi
11
12 git archive "$VERSION:" -o "dist/$BUNDLE.zip" --prefix "$BUNDLE/alive/"
13
14 cd dist
15 unzip "$BUNDLE.zip"
16 cd "$BUNDLE"
17
18 cp -r ../docs .
19 mv alive/hello.alv .
20 rm -rf docs/*.md docs/*.ltp docs/gen
21 rm -rf alive/dist
22
23 unzip ../lua-win.zip
24
25 cat <<EOF >copilot.bat
26 @echo off
27 setlocal
28 set PATH=%PATH%;%~dp0\lua\lua\bin
29 set LUA_PATH=%LUA_PATH%;%~dp0\alive\?.lua;%~dp0\alive\?\init.lua
30 moon %~dp0\alive\init.moon %*
31 exit /b %ERRORLEVEL%
32 EOF
33
34 cat <<EOF >README.txt
35 alivecoding $VERSION
36 ====================
37
38 https://alive.s-ol.nu
39 https://github.com/s-ol/alivecoding
40
41 License
42 -------
43 alive is licensed under the GPLv3 free and open-source license, a copy of which
44 you can find in the file `alive/LICENSE`.
45
46 This binary distribution of alive contains the Lua interpreter, LuaRocks package
47 manager, and a number of Lua modules licensed under various terms. Lua and
48 LuaRocks are both licensed under the MIT license, while the packages can be
49 found within the `lua/lua` directory while their individual licensing
50 information may be viewed using `luarocks.bat`:
51
52 cmd.exe> luarocks.bat list
53 cmd.exe> luarocks.bat show moonscript
54 cmd.exe> luarocks.bat show ...
55 EOF
56
57 cd ..
58 rm "$BUNDLE.zip"
59 zip -rm "$BUNDLE.zip" "$BUNDLE"
0 #!/bin/sh
1 IN=$1
2
3 head -n 2 $IN
4
5 cat <<EOF
6 set PR=%~dp0..\\..\\
7 set PP=%PR:\\=/%
8 EOF
9
10 PP="D:/alive_pkg/lua/"
11 PR=${PP//\//\\\\}\\\\?
12
13 tail -n 2 $IN | \
14 sed -r "s|${PR}|%PR%|g" | \
15 sed "s|${PP}|%PP%|g"
+0
-89
dist/release less more
0 #!/bin/sh
1 VERSION="${1:-scm}"
2 REVISION="${2:-1}"
3
4 if [ "$VERSION" = scm ]; then
5 WHERE=
6 else
7 git tag "$VERSION"
8
9 cat <<EOF >"alv/version.moon"
10 ----
11 -- \`alive\` source code version information.
12 --
13 -- @module version
14
15 --- exports
16 -- @table exports
17 -- @tfield string tag the last versions git tag
18 -- @tfield string web the repo web URL
19 -- @tfield string repo the git repo URL
20 -- @tfield string release the web URL of this release
21 {
22 tag: "${VERSION}"
23 web: "https://github.com/s-ol/alivecoding"
24 repo: "https://github.com/s-ol/alivecoding.git"
25 release: "https://github.com/s-ol/alivecoding/releases/tag/${VERSION}"
26 }
27 EOF
28
29 WHERE="
30 tag = \"$VERSION\","
31 VERSION="${VERSION#v}"
32 VERSION=$(echo "$VERSION" | tr -d -)
33 fi
34
35 list_modules() {
36 find "$1" -type f -name '*.moon' -exec sh -c '
37 MODULE=$(echo "$1" | sed -e "s/\.moon$//" -e "s/\//./g")
38 echo " [\"$MODULE\"] = \"$1\","
39 ' sh {} \;
40 }
41
42 cat <<STOP >"dist/rockspecs/alive-$VERSION-$REVISION.rockspec"
43 package = "alive"
44 version = "$VERSION-$REVISION"
45
46 source = {
47 url = "git://github.com/s-ol/alivecoding.git",$WHERE
48 }
49
50 description = {
51 summary = "Experimental livecoding environment with persistent expressions",
52 detailed = [[
53 This is an experimental livecoding language and environment, in which
54 expressions persist and update until they are removed from the source code, and
55 the interpreter keeps no state that you cannot manipulate directly in the
56 source. This yields a direct-manipulation like experience with a purely
57 text-based language and works without special editor support.]],
58 homepage = "https://alive.s-ol.nu",
59 license = "GPL-3",
60 }
61
62 dependencies = {
63 "lua >= 5.3",
64 "moonscript >= 0.5.0",
65 "lpeg ~> 0.10",
66 "luafilesystem",
67 "luasystem",
68 "luasocket",
69 "osc",
70 }
71
72 build = {
73 type = "builtin",
74 modules = {},
75 copy_directories = { "docs" },
76 install = {
77 lua = {
78 $(list_modules alv)
79
80 $(list_modules alv-lib)
81 },
82 bin = {
83 "bin/alv",
84 "bin/alv-copilot"
85 },
86 },
87 }
88 STOP
0 #!/bin/sh
1 VERSION="${1:-scm}"
2 REVISION="${2:-1}"
3
4 if [ "$VERSION" = scm ]; then
5 WHERE=
6 else
7 git tag "$VERSION"
8
9 cat <<EOF >"alv/version.moon"
10 ----
11 -- \`alive\` source code version information.
12 --
13 -- @module version
14
15 --- exports
16 -- @table exports
17 -- @tfield string tag the last versions git tag
18 -- @tfield string web the repo web URL
19 -- @tfield string repo the git repo URL
20 -- @tfield string release the web URL of this release
21 {
22 tag: "${VERSION}"
23 web: "https://github.com/s-ol/alivecoding"
24 repo: "https://github.com/s-ol/alivecoding.git"
25 release: "https://github.com/s-ol/alivecoding/releases/tag/${VERSION}"
26 }
27 EOF
28
29 WHERE="
30 tag = \"$VERSION\","
31 VERSION="${VERSION#v}"
32 VERSION=$(echo "$VERSION" | tr -d -)
33 fi
34
35 list_modules() {
36 find "$1" -type f -name '*.moon' -exec sh -c '
37 MODULE=$(echo "$1" | sed -e "s/\.moon$//" -e "s/\//./g")
38 echo " [\"$MODULE\"] = \"$1\","
39 ' sh {} \;
40 }
41
42 cat <<STOP >"dist/rockspecs/alive-$VERSION-$REVISION.rockspec"
43 package = "alive"
44 version = "$VERSION-$REVISION"
45
46 source = {
47 url = "git://github.com/s-ol/alivecoding.git",$WHERE
48 }
49
50 description = {
51 summary = "Experimental livecoding environment with persistent expressions",
52 detailed = [[
53 This is an experimental livecoding language and environment, in which
54 expressions persist and update until they are removed from the source code, and
55 the interpreter keeps no state that you cannot manipulate directly in the
56 source. This yields a direct-manipulation like experience with a purely
57 text-based language and works without special editor support.]],
58 homepage = "https://alive.s-ol.nu",
59 license = "GPL-3",
60 }
61
62 dependencies = {
63 "lua >= 5.3",
64 "moonscript >= 0.5.0",
65 "lpeg ~> 0.10",
66 "luafilesystem",
67 "luasystem",
68 "luasocket",
69 "osc",
70 }
71
72 build = {
73 type = "builtin",
74 modules = {},
75 copy_directories = { "docs" },
76 install = {
77 lua = {
78 $(list_modules alv)
79
80 $(list_modules alv-lib)
81 },
82 bin = {
83 "bin/alv",
84 "bin/alv-copilot"
85 },
86 },
87 }
88 STOP