-
-
Notifications
You must be signed in to change notification settings - Fork 1
starting a makefile (need upstream changes tho) #8
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
base: Go
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,14 @@ | ||||||||||||||||||||||
| build: | ||||||||||||||||||||||
| cd Server && go build | ||||||||||||||||||||||
| release: build | ||||||||||||||||||||||
| mkdir js-linux | ||||||||||||||||||||||
| cp Server/config.json js-linux/. | ||||||||||||||||||||||
|
||||||||||||||||||||||
| cp Server/config.json js-linux/. | |
| printf '{\n}\n' > js-linux/config.json |
Copilot
AI
Feb 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a naming inconsistency: the temporary directory is named 'js-linux' but the output tarball is 'jserv-linux-amd64.tar.gz'. Consider using consistent naming, such as 'jserv-linux' for the temporary directory to match the tarball name pattern.
| mkdir js-linux | |
| cp Server/config.json js-linux/. | |
| cp Server/jServ js-linux/. | |
| tar -czvf jserv-linux-amd64.tar.gz js-linux/* | |
| rm -rf js-linux | |
| mkdir jserv-linux | |
| cp Server/config.json jserv-linux/. | |
| cp Server/jServ jserv-linux/. | |
| tar -czvf jserv-linux-amd64.tar.gz jserv-linux/* | |
| rm -rf jserv-linux |
Copilot
AI
Feb 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release target should check if the build succeeded before proceeding with packaging. If go build fails, the release target will continue and package a potentially non-existent or stale binary. Consider adding error handling or making the build dependency explicit by checking for the binary's existence.
Copilot
AI
Feb 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The conditional commands will cause make to fail when the condition is false. In make, if any command returns a non-zero exit code, the target fails. When [[ ! -d /etc/jserv ]] evaluates to false (directory exists), the entire command returns false, causing make to stop. Use || true at the end of each line, or rewrite using shell if-statements wrapped in a single shell invocation.
| [[ ! -d /etc/jserv ]] && mkdir /etc/jserv | |
| [[ -f /usr/bin/jServ ]] && rm /usr/bin/jServ | |
| if [ ! -d /etc/jserv ]; then mkdir /etc/jserv; fi | |
| if [ -f /usr/bin/jServ ]; then rm /usr/bin/jServ; fi |
Copilot
AI
Feb 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the release target, copying config.json directly from Server/ to /etc/jserv/ will overwrite any existing production configuration. On subsequent deployments, this could reset customized settings. Consider either skipping the copy if the file exists, or providing clear documentation that users should backup their config before deploying.
| cp Server/config.json /etc/jserv/. | |
| [[ ! -f /etc/jserv/config.json ]] && cp Server/config.json /etc/jserv/. |
Copilot
AI
Feb 26, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deploy target requires root privileges (writes to /usr/bin and /etc) but doesn't validate permissions or provide clear error messages. The target will fail with cryptic errors if not run with sudo. Consider adding a permission check at the start of the target, or documenting in comments that this target must be run with sudo.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,11 @@ | ||||||||||||||||||
| { | ||||||||||||||||||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||||||||||||||||||
| "extends": ["config:recommended"], | ||||||||||||||||||
| "automerge": true, | ||||||||||||||||||
| "packageRules": [ | ||||||||||||||||||
| { | ||||||||||||||||||
| "matchUpdateTypes": ["minor", "patch", "digest"], | ||||||||||||||||||
| "automerge": true | ||||||||||||||||||
| } | ||||||||||||||||||
| ] | ||||||||||||||||||
|
Comment on lines
+4
to
+10
|
||||||||||||||||||
| "automerge": true, | |
| "packageRules": [ | |
| { | |
| "matchUpdateTypes": ["minor", "patch", "digest"], | |
| "automerge": true | |
| } | |
| ] | |
| "automerge": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing .PHONY declarations for the targets. Since build, release, and deploy are not actual files, they should be declared as .PHONY to ensure make always executes them even if files with those names exist. Add
.PHONY: build release deployat the top of the Makefile.