Skip to content

Instantly share code, notes, and snippets.

@truemedian
Last active November 21, 2021 01:47
Show Gist options
  • Save truemedian/0224d32e4553d76f7b9ffade67082636 to your computer and use it in GitHub Desktop.
Save truemedian/0224d32e4553d76f7b9ffade67082636 to your computer and use it in GitHub Desktop.
Luvi and Lit versions over time
#!/bin/bash
base="$PWD"
file="$PWD/version.md"
git clone https://github.com/luvit/lit
git clone https://github.com/luvit/luvi
echo "" >$file
cd $base/lit
echo "## Lit" >>$file
echo "" >>$file
echo "| Lit | Luvi |" >>$file
echo "| --- | --- |" >>$file
lit_tags="$(git tag -l | sort -V | tr '\n' ' ')"
for tag in $lit_tags; do
echo "Lit $tag"
git reset --hard --quiet $tag 2>/dev/null
if [ -f get-lit.sh ]; then
eval $(cat get-lit.sh | head -n3 | sed -e '/^#/d' -e '/^set/d')
elif [ -f web-install.sh ]; then
eval $(cat web-install.sh | head -n3 | sed -e '/^#/d' -e '/^set/d')
else
LUVI_VERSION=""
fi
echo "| $tag | $LUVI_VERSION |" >>$file
unset LUVI_VERSION
done
cd $base/luvi
echo "" >>$file
echo "## Luvi" >>$file
echo "" >>$file
echo "| Luvi | lpeg | lrexlib | lua-openssl | lua-zlib | luv | openssl | luv/libuv | luv/luajit |" >>$file
echo "| --- | --- | --- | --- | --- | --- | --- | --- | --- |" >>$file
function version_lpeg {
cd deps/lpeg 2>/dev/null || exit 1
grep '#define VERSION ' lptypes.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3
}
function version_lrexlib {
cd deps/lrexlib 2>/dev/null || exit 1
grep 'VERSION = ' Makefile 2>/dev/null | sed -re 's/\s+//g' -e 's/VERSION=//g'
}
function version_lua_openssl {
cd deps/lua-openssl 2>/dev/null || exit 1
grep '#define LOPENSSL_VERSION ' src/openssl.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3
grep '#define LOPENSSL_VERSION_STR ' src/openssl.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3
}
function version_lua_zlib {
cd deps/lua-zlib 2>/dev/null || exit 1
git describe --tags --abbrev=0 --always
}
function version_luv {
cd deps/luv 2>/dev/null || cd luv 2>/dev/null || exit 1
git describe --tags --abbrev=0 --always | cut -d'-' -f1 | head -c7
}
function version_libuv {
cd deps/luv 2>/dev/null || cd luv 2>/dev/null || exit 1
cd deps/libuv 2>/dev/null || cd libuv 2>/dev/null || exit 1
if [ -f include/uv-version.h ]; then
major=$(grep '#define UV_VERSION_MAJOR ' include/uv-version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
minor=$(grep '#define UV_VERSION_MINOR ' include/uv-version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
patch=$(grep '#define UV_VERSION_PATCH ' include/uv-version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
suff=$(grep '#define UV_VERSION_SUFFIX ' include/uv-version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
else
major=$(grep '#define UV_VERSION_MAJOR ' include/uv/version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
minor=$(grep '#define UV_VERSION_MINOR ' include/uv/version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
patch=$(grep '#define UV_VERSION_PATCH ' include/uv/version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
suff=$(grep '#define UV_VERSION_SUFFIX ' include/uv/version.h 2>/dev/null | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f3)
fi
echo "$major.$minor.$patch$suff"
}
function version_luajit {
cd deps/luv 2>/dev/null || cd luv 2>/dev/null || exit 1
cd deps/luajit 2>/dev/null || cd luajit 2>/dev/null || exit 1
git describe --tags --abbrev=0 --always
}
function version_openssl {
if cd deps/openssl 2>/dev/null; then
if [ -f openssl/Makefile ]; then
grep 'VERSION=' openssl/Makefile 2>/dev/null | head -n1 | sed -re 's/\s+//g' -e 's/VERSION=//g'
else
grep 'define OPENSSL_VERSION_TEXT ' openssl/crypto/opensslv.h 2>/dev/null | head -n1 | sed -re 's/\s+/ /g' -e 's/"//g' | cut -d' ' -f5 | cut -d'-' -f1
fi
else
grep 'https://www.openssl.org/source' deps/openssl.cmake 2>/dev/null | sed -re 's/\s+/ /g' -e 's|https://www.openssl.org/source/openssl-||g' -e 's/.tar.gz//g' | cut -d' ' -f3
fi
}
luvi_tags="$(git tag -l | sort -V | tr '\n' ' ')"
for tag in $luvi_tags; do
echo "Luvi $tag"
rm -rf deps/
git reset --hard --quiet $tag 2>/dev/null
git submodule update --init --checkout --recursive --quiet 2>/dev/null
v_lpeg=$(version_lpeg || echo "-")
v_lrexlib=$(version_lrexlib || echo "-")
v_lua_openssl=$(version_lua_openssl || echo "-")
v_lua_zlib=$(version_lua_zlib || echo "-")
v_luv=$(version_luv || echo "-")
v_openssl=$(version_openssl || echo "-")
v_libuv=$(version_libuv || echo "-")
v_luajit=$(version_luajit || echo "-")
echo "| $tag | $v_lpeg | $v_lrexlib | $v_lua_openssl | $v_lua_zlib | $v_luv | $v_openssl | $v_libuv | $v_luajit |" >>$file
done

Lit

Lit Luvi
0.2.1
0.9.0
0.9.1 0.6.6
0.9.2 v0.7.0
0.9.3 v0.7.0
0.9.4 v0.7.0
0.9.5 v0.7.0
0.9.6 v0.7.0
0.9.7 v0.7.0
0.9.8 0.7.1
0.9.9 0.7.1
0.10.0 0.7.1
0.10.1 0.7.1
0.10.2 0.7.1
0.10.3 0.7.1
0.10.4 0.7.1
0.10.5 0.7.1
0.10.6 0.7.1
0.11.0 0.8.1
0.11.1 0.8.1
0.11.2 0.8.1
0.11.3 0.8.1
0.11.4 0.8.1
1.0.0 1.0.0
1.0.1 1.0.0
1.0.2 1.0.1
1.0.3 1.1.0
1.1.0 2.0.0
1.1.1 2.0.1
1.1.2 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 v2.1.0-beta3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment