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

Develop changes #12

Merged
merged 5 commits into from
May 14, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[alias]
prisma = "run --package prisma-cli --"
seed = "run --bin seed --"
seed = "run --features=seed-binary --bin seed --"

# this caused me such an unbearable headache...
[target.x86_64-apple-darwin]
Expand Down
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ static
target
*.lock
*.log
*.db
Binary file modified .github/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/logo_old.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/stump-logo--circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/stump-logo--irregular-lg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/stump-logo--irregular-sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/images/stump-logo--square.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions .github/scripts/setup.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
write-host "Running Stump pre-setup script! This will install the necessary development tools/dependencies required to develop Stump."

# admin privileges (unsure if needed, prolly not)

# if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
# write-Warning "This setup needs admin permissions. Please run this file as admin."
# break
# }

# check if user has cargo installed
if (-NOT (Get-Command cargo -errorAction SilentlyContinue)) {
write-Warning "Rust could not be found on your system. Please ensure the 'rustc' and 'cargo' binaries are in your \$PATH."
break
}

# check if user has pnpm installed
if (-NOT (Get-Command pnpm -errorAction SilentlyContinue)) {
write-Warning "PNPM could not be found on your system. Ensure the 'pnpm' command is in your \$PATH."
break;
}

# TODO: check if anything else is needed

write-host "Pre-setup completed! Be sure to run 'pnpm run setup' to finish the setup."
106 changes: 106 additions & 0 deletions .github/scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#!/bin/bash

echo "Running Stump pre-setup script! This will install the necessary development tools/dependencies required to develop Stump."
echo

which cargo &> /dev/null
if [ $? -eq 1 ]; then
echo "Rust could not be found on your system. Please ensure the 'rustc' and 'cargo' binaries are in your \$PATH."
exit 1
else
echo "Rust found on your system."
fi

which node &> /dev/null
if [ $? -eq 1 ]; then
echo "Node could not be found on your system. Please ensure the 'node'command is in your \$PATH."
exit 1
else
echo "Node found on your system."
fi

echo


which pnpm &> /dev/null
if [ $? -eq 1 ]; then
echo "pnpm could not be found on your system. Would you like for this script to attempt to install 'pnpm'? (y/n)"

can_continue=false
until [ $can_continue = true ]; do
read -p "Choice: " choice

case $choice in
y)
echo "Attempting to install 'pnpm'..."
npm install -g pnpm
if [ $? -eq 0 ]; then
echo "pnpm installed successfully."
can_continue=true
else
echo "pnpm could not be installed. Please ensure you have node and npm installed."
can_continue=false
exit 1
fi
;;
n)
echo "Skipping 'pnpm' installation. Exiting."
can_continue=false
exit 1
;;
*)
echo "Invalid choice. Please enter 'y' or 'n'."
can_continue=false
;;
esac

echo
echo "Would you like for this script to attempt to install 'pnpm'? (y/n)"
done
else
echo "pnpm found on your system."
fi

echo

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
if which apt-get &> /dev/null; then
echo "Detected 'apt' based distro!"
sudo apt-get -y update
sudo apt-get -y install "pkg-config libssl-dev"
elif which pacman &> /dev/null; then
echo "Detected 'pacman' based distro!"
sudo pacman -Syu
sudo pacman -S --needed base-devel openssl libssl-dev
elif which dnf &> /dev/null; then
echo "Detected 'dnf' based distro!"
sudo dnf check-update
sudo dnf install "openssl-devel"
sudo dnf group install "C Development Tools and Libraries" # GCC C/C++ compilers, autoconf, automake, make, etc.,.
else
echo "Your Linux distro '$(lsb_release -s -d)' is not supported by the pre-setup script. Please consider adding support for it: https://github.com/aaronleopold/stump/issues"
exit 1
fi

echo "Running 'pnpm core setup':"
echo

cargo install cargo-watch
pnpm run setup

echo
echo "Pre-setup completed! Be sure to run 'pnpm core seed' to finish the setup."
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo
echo "Running 'pnpm core setup':"
echo

cargo install cargo-watch
pnpm run setup

echo
echo "Pre-setup completed! Be sure to run 'pnpm core seed' to finish the setup."
else
echo "Your OS '$OSTYPE' is not supported by the pre-setup script. Please consider adding support for it: https://github.com/aaronleopold/stump/issues"
exit 1
fi
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"Prisma.prisma",
"matklad.rust-analyzer",
"bradlc.vscode-tailwindcss",
"Gruntfuggly.todo-tree"
]
}
98 changes: 97 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ RUN chown stump:stump stump

USER stump

ENV STUMP_CONFIG_DIR=/config
ENV STUMP_DATA_DIR=/data
ENV ROCKET_PROFILE=release

CMD ["./stump"]
Loading