From 8a7e35508fc3fabe85086b0ac0c777f1ed054e29 Mon Sep 17 00:00:00 2001 From: s-ol Date: Fri, 17 Apr 2020 17:04:52 +0200 Subject: more distribution wip --- dist/build-win.sh | 60 --------------------------- dist/pack-win.sh | 62 ++++++++++++++++++++++++++++ dist/pack.sh | 13 ++++++ dist/release.sh | 4 +- dist/rocks/alive-scm-1.rockspec | 81 +++++++++++++++++++++++++++++++++++++ dist/rockspecs/alive-scm-1.rockspec | 81 ------------------------------------- 6 files changed, 159 insertions(+), 142 deletions(-) delete mode 100755 dist/build-win.sh create mode 100755 dist/pack-win.sh create mode 100755 dist/pack.sh create mode 100644 dist/rocks/alive-scm-1.rockspec delete mode 100644 dist/rockspecs/alive-scm-1.rockspec diff --git a/dist/build-win.sh b/dist/build-win.sh deleted file mode 100755 index bfa5de0..0000000 --- a/dist/build-win.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -VERSION="$1" -BUNDLE="alive-$VERSION-win" - -set -e - -if [ -d "dist/$BUNDLE.zip" ]; then - echo "dist/$BUNDLE.zip already exists!" - exit 2 -fi - -git archive "$VERSION:" -o "dist/$BUNDLE.zip" --prefix "$BUNDLE/alive/" - -cd dist -unzip "$BUNDLE.zip" -cd "$BUNDLE" - -cp -r ../docs . -mv alive/hello.alv . -rm -rf docs/*.md docs/*.ltp docs/gen -rm -rf alive/dist - -unzip ../lua-win.zip - -cat <copilot.bat -@echo off -setlocal -set PATH=%PATH%;%~dp0\lua\lua\bin -set LUA_PATH=%LUA_PATH%;%~dp0\alive\?.lua;%~dp0\alive\?\init.lua -moon %~dp0\alive\init.moon %* -exit /b %ERRORLEVEL% -EOF - -cat <README.txt -alivecoding $VERSION -==================== - -https://alive.s-ol.nu -https://github.com/s-ol/alivecoding - -License -------- -alive is licensed under the GPLv3 free and open-source license, a copy of which -you can find in the file `alive/LICENSE`. - -This binary distribution of alive contains the Lua interpreter, LuaRocks package -manager, and a number of Lua modules licensed under various terms. Lua and -LuaRocks are both licensed under the MIT license, while the packages can be -found within the `lua/lua` directory while their individual licensing -information may be viewed using `luarocks.bat`: - - cmd.exe> luarocks.bat list - cmd.exe> luarocks.bat show moonscript - cmd.exe> luarocks.bat show ... -EOF - -cd .. -rm "$BUNDLE.zip" -zip -rm "$BUNDLE.zip" "$BUNDLE" diff --git a/dist/pack-win.sh b/dist/pack-win.sh new file mode 100755 index 0000000..f0f9ae2 --- /dev/null +++ b/dist/pack-win.sh @@ -0,0 +1,62 @@ +#!/bin/sh + +VERSION="$1" +BUNDLE="alive-$VERSION-win" + +set -e + +if [ -d "dist/$BUNDLE.zip" ]; then + echo "dist/$BUNDLE.zip already exists!" + exit 2 +fi + +# luarocks --tree lua/lua install --deps-mode none ../../alive-scm-1.all.rock + +git archive "$VERSION:" -o "dist/$BUNDLE.zip" --prefix "$BUNDLE/alive/" + +cd dist +unzip "$BUNDLE.zip" +cd "$BUNDLE" + +cp -r ../../docs . +mv alive/hello.alv . +rm -rf docs/*.md docs/*.ltp docs/gen +rm -rf alive/dist + +unzip ../lua-win.zip + +cat <copilot.bat +@echo off +setlocal +set PATH=%PATH%;%~dp0\lua\lua\bin +set LUA_PATH=%LUA_PATH%;%~dp0\alive\?.lua;%~dp0\alive\?\init.lua +moon %~dp0\alive\init.moon %* +exit /b %ERRORLEVEL% +EOF + +cat <README.md +alivecoding $VERSION +==================== + +https://alive.s-ol.nu +https://github.com/s-ol/alivecoding + +License +------- +alive is licensed under the GPLv3 free and open-source license, a copy of which +you can find in the file \`alive/LICENSE\`. + +This binary distribution of alive contains the Lua interpreter, LuaRocks package +manager, and a number of Lua modules licensed under various terms. Lua and +LuaRocks are both licensed under the MIT license, while the packages can be +found within the \`lua/lua\` directory while their individual licensing +information may be viewed using \`luarocks.bat\`: + + cmd.exe> luarocks.bat list + cmd.exe> luarocks.bat show moonscript + cmd.exe> luarocks.bat show ... +EOF + +cd .. +rm "$BUNDLE.zip" +# zip -rm "$BUNDLE.zip" "$BUNDLE" diff --git a/dist/pack.sh b/dist/pack.sh new file mode 100755 index 0000000..b76f2d6 --- /dev/null +++ b/dist/pack.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +VERSION="$1" +REVISION="${2:-1}" + +VERSION="${VERSION#v}" +VERSION=$(echo "$VERSION" | tr -d -) + +luarocks build "dist/rocks/alive-$VERSION-$REVISION.rockspec" \ + --pack-binary-rock \ + --sign \ + --pin diff --git a/dist/release.sh b/dist/release.sh index e7b6923..1aaa978 100755 --- a/dist/release.sh +++ b/dist/release.sh @@ -1,4 +1,6 @@ #!/bin/sh +set -e + VERSION="${1:-scm}" REVISION="${2:-1}" @@ -40,7 +42,7 @@ list_modules() { ' sh {} \; } -cat <"dist/rockspecs/alive-$VERSION-$REVISION.rockspec" +cat <"dist/rocks/alive-$VERSION-$REVISION.rockspec" package = "alive" version = "$VERSION-$REVISION" diff --git a/dist/rocks/alive-scm-1.rockspec b/dist/rocks/alive-scm-1.rockspec new file mode 100644 index 0000000..a416842 --- /dev/null +++ b/dist/rocks/alive-scm-1.rockspec @@ -0,0 +1,81 @@ +package = "alive" +version = "scm-1" + +source = { + url = "git://github.com/s-ol/alivecoding.git", +} + +description = { + summary = "Experimental livecoding environment with persistent expressions", + detailed = [[ +This is an experimental livecoding language and environment, in which +expressions persist and update until they are removed from the source code, and +the interpreter keeps no state that you cannot manipulate directly in the +source. This yields a direct-manipulation like experience with a purely +text-based language and works without special editor support.]], + homepage = "https://alive.s-ol.nu", + license = "GPL-3", +} + +dependencies = { + "lua >= 5.3", + "moonscript >= 0.5.0", + "lpeg ~> 0.10", + "luafilesystem", + "luasystem", + "luasocket", + "osc", +} + +build = { + type = "builtin", + modules = {}, + copy_directories = { "docs" }, + install = { + lua = { + ["alv.result"] = "alv/result.moon", + ["alv.stream.io"] = "alv/stream/io.moon", + ["alv.stream.base"] = "alv/stream/base.moon", + ["alv.stream.value"] = "alv/stream/value.moon", + ["alv.stream.event"] = "alv/stream/event.moon", + ["alv.stream.init"] = "alv/stream/init.moon", + ["alv.builtin"] = "alv/builtin.moon", + ["alv.cell"] = "alv/cell.moon", + ["alv.tag"] = "alv/tag.moon", + ["alv.copilot"] = "alv/copilot.moon", + ["alv.version"] = "alv/version.moon", + ["alv.error"] = "alv/error.moon", + ["alv.invoke"] = "alv/invoke.moon", + ["alv.cycle"] = "alv/cycle.moon", + ["alv.ast"] = "alv/ast.moon", + ["alv.base.builtin"] = "alv/base/builtin.moon", + ["alv.base.op"] = "alv/base/op.moon", + ["alv.base.fndef"] = "alv/base/fndef.moon", + ["alv.base.match"] = "alv/base/match.moon", + ["alv.base.input"] = "alv/base/input.moon", + ["alv.base.init"] = "alv/base/init.moon", + ["alv.registry"] = "alv/registry.moon", + ["alv.logger"] = "alv/logger.moon", + ["alv.init"] = "alv/init.moon", + ["alv.parsing"] = "alv/parsing.moon", + ["alv.scope"] = "alv/scope.moon", + + ["alv-lib.osc"] = "alv-lib/osc.moon", + ["alv-lib.midi"] = "alv-lib/midi.moon", + ["alv-lib.sc"] = "alv-lib/sc.moon", + ["alv-lib.pilot"] = "alv-lib/pilot.moon", + ["alv-lib.random"] = "alv-lib/random.moon", + ["alv-lib.util"] = "alv-lib/util.moon", + ["alv-lib.string"] = "alv-lib/string.moon", + ["alv-lib.midi.launchctl"] = "alv-lib/midi/launchctl.moon", + ["alv-lib.midi.core"] = "alv-lib/midi/core.moon", + ["alv-lib.time"] = "alv-lib/time.moon", + ["alv-lib.logic"] = "alv-lib/logic.moon", + ["alv-lib.math"] = "alv-lib/math.moon", + }, + bin = { + "bin/alv", + "bin/alv-copilot" + }, + }, +} diff --git a/dist/rockspecs/alive-scm-1.rockspec b/dist/rockspecs/alive-scm-1.rockspec deleted file mode 100644 index a416842..0000000 --- a/dist/rockspecs/alive-scm-1.rockspec +++ /dev/null @@ -1,81 +0,0 @@ -package = "alive" -version = "scm-1" - -source = { - url = "git://github.com/s-ol/alivecoding.git", -} - -description = { - summary = "Experimental livecoding environment with persistent expressions", - detailed = [[ -This is an experimental livecoding language and environment, in which -expressions persist and update until they are removed from the source code, and -the interpreter keeps no state that you cannot manipulate directly in the -source. This yields a direct-manipulation like experience with a purely -text-based language and works without special editor support.]], - homepage = "https://alive.s-ol.nu", - license = "GPL-3", -} - -dependencies = { - "lua >= 5.3", - "moonscript >= 0.5.0", - "lpeg ~> 0.10", - "luafilesystem", - "luasystem", - "luasocket", - "osc", -} - -build = { - type = "builtin", - modules = {}, - copy_directories = { "docs" }, - install = { - lua = { - ["alv.result"] = "alv/result.moon", - ["alv.stream.io"] = "alv/stream/io.moon", - ["alv.stream.base"] = "alv/stream/base.moon", - ["alv.stream.value"] = "alv/stream/value.moon", - ["alv.stream.event"] = "alv/stream/event.moon", - ["alv.stream.init"] = "alv/stream/init.moon", - ["alv.builtin"] = "alv/builtin.moon", - ["alv.cell"] = "alv/cell.moon", - ["alv.tag"] = "alv/tag.moon", - ["alv.copilot"] = "alv/copilot.moon", - ["alv.version"] = "alv/version.moon", - ["alv.error"] = "alv/error.moon", - ["alv.invoke"] = "alv/invoke.moon", - ["alv.cycle"] = "alv/cycle.moon", - ["alv.ast"] = "alv/ast.moon", - ["alv.base.builtin"] = "alv/base/builtin.moon", - ["alv.base.op"] = "alv/base/op.moon", - ["alv.base.fndef"] = "alv/base/fndef.moon", - ["alv.base.match"] = "alv/base/match.moon", - ["alv.base.input"] = "alv/base/input.moon", - ["alv.base.init"] = "alv/base/init.moon", - ["alv.registry"] = "alv/registry.moon", - ["alv.logger"] = "alv/logger.moon", - ["alv.init"] = "alv/init.moon", - ["alv.parsing"] = "alv/parsing.moon", - ["alv.scope"] = "alv/scope.moon", - - ["alv-lib.osc"] = "alv-lib/osc.moon", - ["alv-lib.midi"] = "alv-lib/midi.moon", - ["alv-lib.sc"] = "alv-lib/sc.moon", - ["alv-lib.pilot"] = "alv-lib/pilot.moon", - ["alv-lib.random"] = "alv-lib/random.moon", - ["alv-lib.util"] = "alv-lib/util.moon", - ["alv-lib.string"] = "alv-lib/string.moon", - ["alv-lib.midi.launchctl"] = "alv-lib/midi/launchctl.moon", - ["alv-lib.midi.core"] = "alv-lib/midi/core.moon", - ["alv-lib.time"] = "alv-lib/time.moon", - ["alv-lib.logic"] = "alv-lib/logic.moon", - ["alv-lib.math"] = "alv-lib/math.moon", - }, - bin = { - "bin/alv", - "bin/alv-copilot" - }, - }, -} -- cgit v1.2.3