-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,246 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
engine-strict=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM ubuntu:23.10 | ||
|
||
# Node installation instructions: | ||
# https://github.com/nodesource/distributions#installation-instructions | ||
ENV NODE_MAJOR=16 | ||
|
||
ENV DEBIAN_FRONTEND="noninteractive" | ||
|
||
# Default version to check out is master. Use --build-arg to customize this | ||
ARG VERSION | ||
ENV VERSION=${VERSION:-master} | ||
|
||
# Install node, npm and a few utilities used for debugging | ||
RUN apt-get update \ | ||
&& apt-get install -y ca-certificates gnupg sudo curl wget build-essential git vim \ | ||
&& sudo mkdir -p /etc/apt/keyrings \ | ||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ | ||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list \ | ||
&& sudo apt-get update \ | ||
&& sudo apt-get install -y npm \ | ||
&& npm install -g yarn | ||
|
||
# Build the app | ||
RUN git clone https://github.com/stylesuxx/esc-configurator.git \ | ||
&& cd esc-configurator \ | ||
&& git checkout $VERSION \ | ||
&& yarn \ | ||
&& yarn global add serve \ | ||
&& yarn build | ||
|
||
CMD ["serve", "-s", "/esc-configurator/build", "-l", "1234"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash -eux | ||
|
||
# Port on your local machine that you want esc-configurator to be listening on | ||
LOCAL_PORT=8234 | ||
|
||
# Fetch tag of latest release version | ||
VERSION=$(curl --silent "https://api.github.com/repos/stylesuxx/esc-configurator/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') | ||
|
||
docker buildx \ | ||
build \ | ||
--build-arg VERSION=$VERSION \ | ||
--progress plain \ | ||
--platform linux/amd64 \ | ||
--tag esc-configurator:latest \ | ||
. | ||
|
||
docker run \ | ||
--detach \ | ||
--interactive \ | ||
--privileged \ | ||
--publish $LOCAL_PORT:1234 \ | ||
--volume /dev/bus/usb:/dev/bus/usb \ | ||
esc-configurator:latest | ||
|
||
# This bit tries to guess the binary name of google chrome | ||
BIN1=google-chrome | ||
BIN2=google-chrome-stable | ||
BIN3=google-chrome-unstable | ||
BIN4=google-chrome-beta | ||
|
||
if (which $BIN1 &>/dev/null); then | ||
$BIN1 http://localhost:$LOCAL_PORT | ||
elif (which $BIN2 &>/dev/null); then | ||
$BIN2 http://localhost:$LOCAL_PORT | ||
elif (which $BIN3 &>/dev/null); then | ||
$BIN3 http://localhost:$LOCAL_PORT | ||
elif (which $BIN4 &>/dev/null); then | ||
$BIN4 http://localhost:$LOCAL_PORT | ||
else | ||
echo | ||
echo "The $BIN1 binary was not found on this machine." | ||
echo "It is required to open esc-configurator." | ||
echo "Exiting." | ||
echo | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.