Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Allow install scripts to be used by koreader CI" #75

Merged
merged 2 commits into from Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker/ubuntu/baseimage/Dockerfile
Expand Up @@ -17,4 +17,4 @@ RUN chown ko:ko /home/ko/.bashrc
USER ko
WORKDIR /home/ko
RUN ./install_lint.sh
RUN ./install_luarocks.sh "/home/ko"
RUN ./install_luarocks.sh
8 changes: 4 additions & 4 deletions docker/ubuntu/baseimage/install_lint.sh
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

HOME="$1"
HOME=/home/ko

cd $HOME || exit

Expand All @@ -9,15 +9,15 @@ export PATH=${HOME}/local/bin:$PATH
[ ! -d "${HOME}/local/bin" ] && mkdir -p "${HOME}/local/bin"

#install our own updated shellcheck
SHELLCHECK_VERSION="v0.8.0"
SHELLCHECK_VERSION="v0.7.2"
SHELLCHECK_URL="https://github.com/koalaman/shellcheck/releases/download/${SHELLCHECK_VERSION?}/shellcheck-${SHELLCHECK_VERSION?}.linux.x86_64.tar.xz"
if [ "$(shellcheck --version)" != "v0.8.0" ]; then
if ! command -v shellcheck; then
curl -sSL "${SHELLCHECK_URL}" | tar --exclude 'SHA256SUMS' --strip-components=1 -C "${HOME}/local/bin" -xJf -
chmod +x "${HOME}/local/bin/shellcheck"
shellcheck --version
else
echo -e "${ANSI_GREEN}Using system shellcheck."
fi
shellcheck --version

# install shfmt
SHFMT_URL="https://github.com/mvdan/sh/releases/download/v3.4.0/shfmt_v3.4.0_linux_amd64"
Expand Down
31 changes: 25 additions & 6 deletions docker/ubuntu/baseimage/install_luarocks.sh
@@ -1,11 +1,30 @@
#!/usr/bin/env bash

apt-get install --no-install-recommends luarocks
HOME=/home/ko

luarocks install luacov
luarocks install ldoc
cd $HOME || exit

luarocks install lanes # for parallel luacheck
luarocks install luacheck
git clone https://github.com/torch/luajit-rocks.git
pushd luajit-rocks && {
git checkout 2c7496b905f6f972673effda4884766433b7583b
cmake . -DWITH_LUAJIT21=ON -DCMAKE_INSTALL_PREFIX=${HOME}/local
make install
} && popd || exit
rm -rf luajit-rocks

luarocks build https://raw.githubusercontent.com/Olivine-Labs/busted/2e4799e06b865c352baa7f7721e32aedaafd19d6/busted-scm-2.rockspec
mkdir ${HOME}/.luarocks
cp ${HOME}/local/etc/luarocks/config.lua ${HOME}/.luarocks/config.lua

export PATH=$HOME/local/bin:$PATH

echo "wrap_bin_scripts = false" >>${HOME}/.luarocks/config.lua
luarocks --local install luafilesystem
luarocks --local install ansicolors
luarocks --local install busted 2.0.0-1
luarocks --local install luacov
# luasec doesn't automatically detect 64-bit libs
luarocks --local install luasec OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu
luarocks --local install luacov-coveralls --server=http://rocks.moonscript.org/dev
luarocks --local install luacheck
luarocks --local install lanes # for parallel luacheck
luarocks --local install ldoc