Testing #1

Merged
LukeGus merged 9 commits from testing into main 2024-11-28 04:52:52 +00:00
6 changed files with 73 additions and 3 deletions

2
.gitconfig Normal file
View File

@@ -0,0 +1,2 @@
[credential]
helper = store

View File

@@ -3,7 +3,10 @@ name: Build and Push Docker Image
on:
push:
branches:
- main
- testing
- pre-release
- alpha
- beta
workflow_dispatch:
inputs:
tag_name:

1
.gitignore vendored
View File

@@ -132,6 +132,7 @@ yarn-error.log*
.profile
.sudo_as_admin_successful
.wget-hsts
.git-credentials
# VSCode Files
.vscode-server/

View File

@@ -22,8 +22,8 @@ COPY --from=frontend-build /app/frontend/dist /usr/share/nginx/html
COPY --from=backend-build /backend /backend
COPY --from=backend-build /backend/entrypoint.sh /backend/entrypoint.sh
# Configure start-up
RUN chmod +x /backend/entrypoint.sh
ENTRYPOINT ["/backend/entrypoint.sh"]
EXPOSE 80

View File

@@ -23,7 +23,7 @@ const App = () => {
terminal.current.open(terminalRef.current);
// Connect to the WebSocket server
socket.current = new WebSocket('2.tcp.ngrok.io:10908');
socket.current = new WebSocket('localhost:3001');
// WebSocket Event Handlers
socket.current.onopen = () => {

64
git_push.sh Executable file
View File

@@ -0,0 +1,64 @@
#!/bin/bash
# Check if the correct number of parameters is provided
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <commit-message> <branch-name>"
exit 1
fi
# Assign parameters to variables
COMMIT_MESSAGE=$1
BRANCH_NAME=$2
# Ensure Git is using the credential helper for HTTPS
git config --global credential.helper store
# Check if the branch exists
BRANCH_EXISTS=$(git branch --list "$BRANCH_NAME")
if [ -z "$BRANCH_EXISTS" ]; then
echo "Branch '$BRANCH_NAME' does not exist. Creating it now..."
git checkout -b "$BRANCH_NAME"
if [ $? -ne 0 ]; then
echo "Failed to create branch '$BRANCH_NAME'."
exit 1
fi
else
echo "Branch '$BRANCH_NAME' exists. Checking it out..."
git checkout "$BRANCH_NAME"
if [ $? -ne 0 ]; then
echo "Failed to checkout branch '$BRANCH_NAME'."
exit 1
fi
fi
# Check if there are any changes to commit
if git diff --quiet; then
echo "No changes to commit."
exit 0
fi
# Perform git operations
echo "Adding all changes..."
git add .
if [ $? -ne 0 ]; then
echo "Failed to add changes."
exit 1
fi
echo "Committing changes with message: $COMMIT_MESSAGE"
git commit -m "$COMMIT_MESSAGE"
if [ $? -ne 0 ]; then
echo "Commit failed."
exit 1
fi
echo "Pushing changes forcefully to branch: $BRANCH_NAME"
export GIT_ASKPASS=echo
git push -f origin "$BRANCH_NAME"
if [ $? -ne 0 ]; then
echo "Push failed."
exit 1
fi
echo "Git operations completed successfully."