diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/luarocks-upload.sh | 10 | ||||
| -rw-r--r-- | scripts/test-luarocks-install.sh | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/luarocks-upload.sh b/scripts/luarocks-upload.sh new file mode 100644 index 00000000..8c4ff1f4 --- /dev/null +++ b/scripts/luarocks-upload.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# Expects the LUAROCKS_API_KEY secret to be set + +TMP_DIR=$(mktemp -d) +MODREV=$(git describe --tags --always --first-parent | tr -d "v") +DEST_ROCKSPEC="$TMP_DIR/nvim-lspconfig-$MODREV-1.rockspec" +cp "nvim-lspconfig-scm-1.rockspec" "$DEST_ROCKSPEC" +sed -i "s/= 'scm'/= '$MODREV'/g" "$DEST_ROCKSPEC" +luarocks upload "$DEST_ROCKSPEC" --api-key="$LUAROCKS_API_KEY" diff --git a/scripts/test-luarocks-install.sh b/scripts/test-luarocks-install.sh new file mode 100644 index 00000000..8d8d3242 --- /dev/null +++ b/scripts/test-luarocks-install.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +MODREV=$(git describe --tags --always --first-parent | tr -d "v") +luarocks install "nvim-lspconfig" "$MODREV" |
