C# installer and .js for TS LS

6.19.x
Eugene Ivantsov 2018-06-19 11:39:59 +03:00
parent 0369cee1be
commit c91e10592f
2 changed files with 8 additions and 48 deletions

View File

@ -26,7 +26,8 @@ unset PACKAGES
command -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" tar"; }
command -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" curl"; }
AGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.csharp.binaries/1.0.1
LS_CSHARP_VERSION="1.31.1"
AGENT_BINARIES_URI="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${LS_CSHARP_VERSION}/omnisharp-linux-x64.tar.gz"
CHE_DIR=$HOME/che
LS_DIR=${CHE_DIR}/ls-csharp
LS_LAUNCHER=${LS_DIR}/launch.sh
@ -83,13 +84,6 @@ elif echo ${LINUX_TYPE} | grep -qi "Red Hat"; then
${SUDO} scl enable rh-dotnetcore20 bash;
}
command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} yum -y install nodejs;
}
# Install for Ubuntu 14.04, 16.04, 16.10 & Linux Mint 17, 18 (64 bit)
####################################
@ -123,16 +117,6 @@ elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then
${SUDO} apt-get -y install dotnet-sdk-2.0.0-preview2-006497
}
command -v nodejs >/dev/null 2>&1 || {
{
curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -;
};
${SUDO} apt-get update;
${SUDO} apt-get install -y nodejs;
}
# Debian 8
##########
elif echo ${LINUX_TYPE} | grep -qi "debian"; then
@ -151,15 +135,6 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}
command -v nodejs >/dev/null 2>&1 || {
{
curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} bash -;
};
${SUDO} apt-get update;
${SUDO} apt-get install -y nodejs;
}
# Fedora 24, 25, 26
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
@ -177,12 +152,6 @@ elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}
command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} dnf -y install nodejs;
}
# CentOS 7.1 (64 bit) & Oracle Linux 7.1 (64 bit)
###############################
elif echo ${LINUX_TYPE} | grep -qi "centos"; then
@ -199,12 +168,6 @@ elif echo ${LINUX_TYPE} | grep -qi "centos"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}
command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | bash -;
${SUDO} yum -y install nodejs;
}
# SUSE Linux Enterprise Server (64 bit), openSUSE (64 bit)
###############
elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then
@ -221,11 +184,6 @@ elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then
${SUDO} ln -s /opt/dotnet/dotnet /usr/local/bin;
}
command -v nodejs >/dev/null 2>&1 || {
${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js
${SUDO} zypper in nodejs
}
else
>&2 echo "Unrecognized Linux Type"
>&2 cat /etc/os-release
@ -238,10 +196,12 @@ fi
#####################
if [ ! -d "${LS_DIR}/node_modules" ]; then
curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${CHE_DIR}
if [ ! -f "${LS_DIR}/run" ]; then
echo "Downloading C# language server"
curl -L -o ${LS_DIR}/omnisharp-linux-x64.tar.gz ${AGENT_BINARIES_URI}
cd ${LS_DIR} && tar -xzf omnisharp-linux-x64.tar.gz
fi
touch ${LS_LAUNCHER}
chmod +x ${LS_LAUNCHER}
echo "nodejs ${LS_DIR}/node_modules/omnisharp-client/languageserver/server.js" > ${LS_LAUNCHER}
echo "${LS_DIR}/run -lsp" > ${LS_LAUNCHER}

View File

@ -28,7 +28,7 @@ import org.eclipse.che.api.languageserver.ProcessCommunicationProvider;
@Singleton
public class TypeScriptLanguageServerConfig implements LanguageServerConfig {
private static final String REGEX = ".*\\.(ts|tsx)";
private static final String REGEX = ".*\\.(js|ts|tsx)";
private final Path launchScript;