#219 & #168 Build script optimization #237

Closed
a24timsv wants to merge 0 commits from #219-&-#208-Build-script-optimization into temp-week-2-merge-branch
Collaborator

Took the original build scripts and refactored them into a first time installation script and a rebuild images script, moved them to a scripts directory and added a readme.

This can be reviewed but not merged yet, since it will cause more issues than it resolves. We will merge this as the last merge with Andras and fix the paths depending on what they are (add mockup containers, etc.).

Took the original build scripts and refactored them into a first time installation script and a rebuild images script, moved them to a scripts directory and added a readme. This can be reviewed but not merged yet, since it will cause more issues than it resolves. We will merge this as the last merge with Andras and fix the paths depending on what they are (add mockup containers, etc.).
Put all scripts in a scripts directory and added a readme (instructions) to it.
Completed the restructuring and breakout from the scripts. Tested and experimented with some packages (see issue #175 for relevant question). This will be merged later to avoid merge conflicts, and updated later for the Final-Finalization.
a24timsv changed title from WIP: #219-&-#208-Build-script-optimization to WIP: #219 & #208 Build script optimization 2026-04-10 13:05:57 +00:00
a24timsv changed title from WIP: #219 & #208 Build script optimization to WIP: #219 & #168 Build script optimization 2026-04-10 13:07:11 +00:00
The Linux script added packages in tempSensorMockup instead of readTempSensonMockup. This doesn't cause issues it seems since no one has commented on this. Also fixed some formatting
b24idalu approved these changes 2026-04-13 11:47:51 +00:00
Dismissed
b24idalu left a comment
Collaborator

Looked through everything and tested the windows versions, they are good.

Looked through everything and tested the windows versions, they are good.
Author
Collaborator

Thanks for the review! It seems that I accidentally put the review label on when I wasn't completely done. Oopsies. I plan to add a dependency check for git, node and docker (maybe VSC if possible) before we actually merge it.

Thanks for the review! It seems that I accidentally put the review label on when I wasn't completely done. Oopsies. I plan to add a dependency check for git, node and docker (maybe VSC if possible) before we actually merge it.
Dependency checking now exist, it will currently check for git, docker, node and code (CLI version of VSC). Future developers can easily add their own dependencies if needed.

Also clarified some stuff in the readme.
Of course I forgot to fix the comments
Author
Collaborator

Now everything I had in mind is added (sorry about that Ida).

This PR needs two reviewers, one with a Windows system and one with an UNIX system.

Now everything I had in mind is added (sorry about that Ida). This PR needs two reviewers, one with a Windows system and one with an UNIX system.
a24timsv changed title from WIP: #219 & #168 Build script optimization to #219 & #168 Build script optimization 2026-04-14 07:18:56 +00:00
b24idalu requested changes 2026-04-14 07:58:19 +00:00
Dismissed
b24idalu left a comment
Collaborator

Tested the windows version.
Everything still works, could be a good idea to add some comments in the function though to let others know how it works. It is also missing coding standard at the variable (should be camelCase). No rules are set in the wiki for functions, could be a good idea to update it and add the rules used here.

Tested the windows version. Everything still works, could be a good idea to add some comments in the function though to let others know how it works. It is also missing coding standard at the variable (should be camelCase). No rules are set in the wiki for functions, could be a good idea to update it and add the rules used here.
Fixed coding standards for Batch according to feedback.

Also, comments.
Author
Collaborator

I hopefully fixed everything for the Batch files. I also added a comment about what the function does, but I don't know if it is necessary to comment about every part of it. Most of the stuff is just Batch being Batch.

As for coding standards, this is what I came up with regarding both:

Batch:

  • Functions should use the same naming style as variables (camelCase) and use $1, $2, etc. for parameters.
  • Comparisons in Batch uses quotes even if it isn't a string, variables are put between '!'s or '%'s. Example:
if "!dependencyMissing!"=="true" (
  ::Something happens
)
or
if "%dependencyMissing%"=="true" (
  ::Something happens
)

Bash:

  • Functions should use the same naming style as variables (snake_case) and use $1, $2, etc. for parameters.
  • Comparisons don't usually need quotes, but can be used to avoid bugs with variables having spaces in them. Otherwise if-statments only need to end with "fi":
if $dependency_missing; then
  echo "Missing dependencies"
  exit 1
fi

Overall:

  • Functions should have a comment that describes what the function does.

This is the stuff that I could come up with at the time, if there is something missing let me know. I'll add everything to the wiki once the PR is closed.

I hopefully fixed everything for the Batch files. I also added a comment about what the function does, but I don't know if it is necessary to comment about every part of it. Most of the stuff is just Batch being Batch. As for coding standards, this is what I came up with regarding both: ### Batch: - Functions should use the same naming style as variables (camelCase) and use $1, $2, etc. for parameters. - Comparisons in Batch uses quotes even if it isn't a string, variables are put between '!'s or '%'s. Example: ```bat if "!dependencyMissing!"=="true" ( ::Something happens ) or if "%dependencyMissing%"=="true" ( ::Something happens ) ``` ### Bash: - Functions should use the same naming style as variables (snake_case) and use $1, $2, etc. for parameters. - Comparisons don't usually need quotes, but can be used to avoid bugs with variables having spaces in them. Otherwise if-statments only need to end with "fi": ```bash if $dependency_missing; then echo "Missing dependencies" exit 1 fi ``` ### Overall: - Functions should have a comment that describes what the function does. This is the stuff that I could come up with at the time, if there is something missing let me know. I'll add everything to the wiki once the PR is closed.
b24idalu approved these changes 2026-04-14 08:57:35 +00:00
b24idalu left a comment
Collaborator

Looks good! All comments are fixed.

Looks good! All comments are fixed.
Collaborator

Build and installation scripts also work for Linux and is approved! But command lines are different to run rebuild and installation use:
sudo sh ./UnixInstallation.sh
sudo sh ./UnixRebuild.sh

Build and installation scripts also work for Linux and is approved! But command lines are different to run rebuild and installation use: `sudo sh ./UnixInstallation.sh` `sudo sh ./UnixRebuild.sh`
Collaborator

Fixed minor syntax issues with the UnixInstallation Bash script

Fixed minor syntax issues with the UnixInstallation Bash script
Added usage section to readme to address the issue with how Unix systems might call the scripts.
Author
Collaborator

With Hirad's fix I think everything is in order.

I also added the new stuff about the coding conventions to the wiki and updated the readme how to use the scripts.

Will merge on Wednesday.

With Hirad's fix I think everything is in order. I also added the new stuff about the coding conventions to the [wiki](https://git.webug.se/Andras/BoundlessFlowCampus2K/wiki/Scripting) and updated the readme how to use the scripts. Will merge on Wednesday.
b24johka changed target branch from team_1_week_1 to temp-week-2-merge-branch 2026-04-15 09:18:01 +00:00
Collaborator

This has been manually merged

This has been manually merged
b24johka closed this pull request 2026-04-15 11:54:37 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Andras/BoundlessFlowCampus2K!237
No description provided.