Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
34 changes: 21 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,6 @@

The project has been generated by Spring Initializer.

## Instructions Before Building Project

⚠ Make sure NOT to push `template-settings.xml` at all times. ⚠

First of all, generate personal access token with this url : https://github.com/settings/tokens

- Create one classic token
- Make sure to give project, read:packages, repo scopes
- Give it a name
- Then click on "Generate Token"
- In case of errors, please check [here](#Common Maven errors)

# Setup Project

Run the following command to set up the project:
Expand All @@ -93,8 +81,28 @@ Run the following command to set up the project:
sh setup/setup.sh
```

`⚠ Windows Users: Please make sure to run the command inside Git Bash terminal (not PowerShell or CMD).`

During the setup process, you will be asked whether you already have a GitHub Personal Access Token.

- If you already have one, just paste it.

- If not, the script will guide you to generate a new one.

#### Don't forget to enable Lombok pre-processing in your IDE!

## Generate GitHub Personal Access Token (Optional)

If you prefer to create a token manually before running the setup:
- Go to : https://github.com/settings/tokens
- Create one classic token
- Make sure to give project, read:packages, repo scopes
- Give it a name
- Then click on "Generate Token"
- In case of errors, please check [here](#Common Maven errors)

⚠ Copy your token somewhere safe, you will need it during setup.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bu kısımları başlığı olmadan 91'in altına taşısak ve doğrudan alt madde olarak tanımlasak daha iyi yönlendirebilir

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go to, ve if you prefer kısmına da ihtiyaç yok bence

Copy link
Contributor Author

@MenekseYuncu MenekseYuncu Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you prefer eklemezsem bu sefer de optional seçenek gibi gözükmüyor.

## Running as Docker MySQL container

Before running the project, you need to run the following command to start the MySQL container:
Expand Down Expand Up @@ -157,7 +165,7 @@ Page.

## Postman

### [Documentation](https://documenter.getpostman.com/view/26813504/2s93kz55Jz) & [Workspace](https://www.postman.com/afetyonetimsistemi/workspace/api)
### [Documentation](https://documenter.getpostman.com/view/26813504/2s93kz55Jz) & [Workspace](https://www.postman.com/ays-team/api)

---

Expand Down
63 changes: 37 additions & 26 deletions setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,33 +47,44 @@ if [[ "$IS_OVERWRITE" == true ]]; then

while true; do
echo "\033[97m"
read -p "➡️ Enter your GitHub Access Token (press enter for creating) : " YOUR_PERSONAL_GITHUB_ACCESS_TOKEN
if [[ -n "$YOUR_PERSONAL_GITHUB_ACCESS_TOKEN" ]]; then
break
fi

echo ""
echo "\033[96mPress Enter to open browser for creating a new Personal Access Token...\033[0m"
read -p "" _

if command -v xdg-open >/dev/null; then
xdg-open "https://github.com/settings/tokens/new"
elif command -v open >/dev/null; then
open "https://github.com/settings/tokens/new"
else
echo "Please open the following URL in your browser to create a new Personal Access Token: "
echo " https://github.com/settings/tokens/new"
fi

while true; do
echo "\033[97m"
read -p "➡️ Paste your Personal Access Token here: " YOUR_PERSONAL_GITHUB_ACCESS_TOKEN
if [[ -n "$YOUR_PERSONAL_GITHUB_ACCESS_TOKEN" ]]; then
read -p "➡️ Do you already have a GitHub Access Token? (y/n): " has_token
case "$has_token" in
[Yy]* )
while true; do
echo "\033[97m"
read -p "➡️ Enter your GitHub Access Token: " YOUR_PERSONAL_GITHUB_ACCESS_TOKEN
if [[ -n "$YOUR_PERSONAL_GITHUB_ACCESS_TOKEN" ]]; then
break
fi
echo "\033[41mPlease enter your GitHub Access Token.\033[0m"
done
break
;;
[Nn]* )
echo "\033[96m➡️ Press Enter for creating Token:\033[0m"
read -p "" _
if command -v xdg-open >/dev/null; then
xdg-open "https://github.com/settings/tokens/new"
elif command -v open >/dev/null; then
open "https://github.com/settings/tokens/new"
else
echo "Please open the following URL in your browser to create a new Personal Access Token: "
echo " https://github.com/settings/tokens/new"
fi
while true; do
echo "\033[97m"
read -p "➡️ Paste your Personal Access Token: " YOUR_PERSONAL_GITHUB_ACCESS_TOKEN
if [[ -n "$YOUR_PERSONAL_GITHUB_ACCESS_TOKEN" ]]; then
break
fi
echo "\033[41mPlease paste your Personal Access Token.\033[0m"
done
break
fi
echo "\033[41mPlease paste your Personal Access Token.\033[0m"
done
break
;;
* )
echo "Invalid choice, please enter 'y' or 'n'."
;;
esac
done
echo "\033[0m"

Expand Down