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

WIP: SBIN Code Refactor #298

Open
wants to merge 42 commits into
base: develop
Choose a base branch
from
Open

WIP: SBIN Code Refactor #298

wants to merge 42 commits into from

Conversation

rhoop
Copy link
Contributor

@rhoop rhoop commented Jan 27, 2024

Refactor and clean up of SBIN. The scripts have been hacked on (by me) so I wanted to clean them up. This will make a fresh start for the service health checks I need to complete for K8.

Richard Hoop and others added 21 commits January 27, 2024 00:57
* Added local keyword to declare variables within functions to limit their scope.
* Combined the variable declarations and assignments for better readability.
* Removed the `tr -d '\n'` command and replaced it with `echo -n` to write the private key to the file without a newline character.
* Removed comments that are redundant or self-explanatory.
…e naming convention.

Renamed the guard function to confirm to better reflect its purpose.
Renamed the guard_overwrite function to confirm_overwrite for consistency.
Renamed the reqdotenv function to require_dotenv for clarity.
Renamed the reqenv function to require_env for consistency.
Removed the comment about -y in the confirm_overwrite function as it was redundant.
Improved the formatting and added comments for better readability.
…eir scope.

Combined the variable declarations and assignments for better readability.
Removed the tr -d '\n' command and replaced it with echo -n to write the private key to the file without a newline character.
Removed comments that are redundant or self-explanatory.
Removed unnecessary comments and debugging statements for a cleaner code
Added descriptive comments for better understanding
Used consistent indentation for improved readability
Used double quotes around variable expansions for better robustness
Reorganized the code to improve flow and readability
Created a function cleanup_file to handle the repetitive code for removing files.
Improved variable names for readability (e.g., SBIN to SCRIPT_DIR).
Removed debug statements to improve code cleanliness.
Added comments for clarity and readability.
Standardized variable names (e.g., SBIN to SCRIPT_DIR).
Used double quotes around variables to handle spaces and special characters in file paths.
Improved indentation and formatting for better readability.
…ge readability, and removed unnecessary debugging statements for better code clarity.
…ed readability by organizing the code and removing unnecessary echo statements.
…e debugging statement, and improved the readability of the code by reformatting the comments and aligning the code blocks.
…oved readability.

Removed debugging statements and provided more informative output for usage.
Set default values for variables and handled command line arguments more clearly.
Organized the code in a more structured and readable manner.
Removed the debugging statement "set -ex" for improved readability.
Added comments to explain the purpose of each section of the script.
Utilized more descriptive environment variable names for clarity.
Reorganized the script for better structure and readability.
Renamed JWT to JWT_SECRET for clarity.
Removed unnecessary variable reassignment.
Removed debugging statement.
Improved variable naming for better readability.
…ase, removed debugging statements, improved readability by using descriptive variable names, and made the code more consistent.
…improved readability by following common shell scripting conventions.
…ncy.

Removed the unnecessary echo statement for better readability.
Improved variable names for better readability and maintainability.
Standardized the variable name for the lock file.
…g statements, improving readability, and more. Explain what you did to clean it up in a short and concise way.
Removed unnecessary cd command by directly assigning the result to SBIN_DIR.
Standardized the variable names for better readability.
Removed debugging statements.
Escaped the $FLAGS[@] inside the echo command to prevent premature expansion.
Removed debugging statements
Added comments for clarity
Standardized the flag parsing section
Made the script more readable and maintainable
Removed debugging statements for better readability.
Improved readability by formatting the code with line breaks and indentation.
Consolidated the flags into an array for better organization.
Copy link

changeset-bot bot commented Jan 27, 2024

⚠️ No Changeset found

Latest commit: 6f09db6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@rhoop rhoop changed the title SBIN Code Refactor WIP: SBIN Code Refactor Jan 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants