Skip to content

removed Makefile and added equivalent bash script#2003

Open
sacrana0 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:sachin-dev
Open

removed Makefile and added equivalent bash script#2003
sacrana0 wants to merge 1 commit into
mosip:develop-gofrom
Infosys:sachin-dev

Conversation

@sacrana0

@sacrana0 sacrana0 commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

#2002

Summary by CodeRabbit

  • New Features

    • Added cross-platform build script for Linux and Windows (Git Bash)
  • Documentation

    • Updated build, run, and test instructions to use make.sh script
    • Enhanced testing guidance and OAuth smoke test documentation
    • Added Bash and OpenSSL prerequisites
  • Chores

    • Migrated build automation from Makefile to Bash implementation

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sacrana0, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 38 minutes. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4fc0a370-09ba-401c-9718-2006387374f9

📥 Commits

Reviewing files that changed from the base of the PR and between 4cce544 and f09d7a0.

📒 Files selected for processing (3)
  • esignet-service/Makefile
  • esignet-service/README.md
  • esignet-service/make.sh

Walkthrough

This PR replaces the GNU Makefile with a Bash script (make.sh) that provides cross-platform build support for Linux and Git Bash on Windows. The script implements all original targets—keys, build, run, test, lint, Docker, SQLC, smoke tests, and maintenance—while improving environment handling, CRLF safety, and variable override support. Documentation is updated throughout to guide users to use ./make.sh instead of make.

Changes

Build system replacement

Layer / File(s) Summary
Build script implementation: environment and targets
esignet-service/make.sh (lines 1–135)
Bash script bootstrap loads .env with CRLF safety, processes command-line variable overrides, detects Windows/Git Bash, and defines defaults for ports, paths, tool versions, and feature flags. Core workflow targets generate TLS keys, build production binaries with CGO disabled, run via go run with injected env, execute tests/coverage with optional race detection, and run linting via golangci-lint.
Build script extended features: utilities and dispatch
esignet-service/make.sh (lines 136–277)
OAuth smoke-test wrapper, Docker image build/run, SQLC database regeneration with fallback, sqlc/golangci-lint installation, Go module replace maintenance for Thunder branch, cleanup targets, help text describing all targets and overridable variables, and target dispatcher with error handling for unknown targets.
Documentation updates: build, run, and test guidance
esignet-service/README.md
Prerequisites now require Bash (Git Bash on Windows) with bundled OpenSSL clarification. All build, run, test, Docker, SQLC, and smoke-test command references switch from make to ./make.sh. Binary output path updated to ./out/esignet.exe with Linux guidance. Testing section adds miniredis/Redis details and TLS key requirements. Postman folder sequencing expanded (especially folder 2), folder 3 MOSIP OTP variable setup clarified, and OAuth end-to-end command prefers ./make.sh smoke with inline BASE_URL alternative.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related issues

Poem

🐰 A script hops where Makefiles roamed,
Cross-platform paths now well-homed,
Windows and Linux, hand in hand,
.env loads safely through the land,
Build and test on every shore! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: removal of the Makefile and creation of an equivalent bash script (make.sh) for build automation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@esignet-service/make.sh`:
- Line 189: Remove the dead reference to the `engine` binary in the cleanup
command: update the rm invocation in make.sh that currently lists "$BINARY" and
`engine` so it only removes the actual build artifact represented by "$BINARY";
locate the `rm -f "$BINARY" engine` line and delete `engine` from that command
to avoid removing a non-existent/legacy target.
- Around line 104-108: The target_coverage function currently hardcodes -race in
the go test invocation, ignoring the RACE variable used in target_test; update
target_coverage to construct and honor the same race flag logic (e.g., build a
RACE_ARG variable based on RACE like target_test does: if RACE != 0 then
RACE_ARG="-race" else RACE_ARG="" ) and use go test $RACE_ARG
-coverprofile=coverage.out -covermode=atomic ./... so coverage respects users
setting (keep function name target_coverage and the coverage profile steps
as-is).
- Line 190: Add a safety guard before the purge command that uses OUT_DIR and
bin/ so rm -rf cannot run if OUT_DIR is empty or "/", e.g. check that the
variable OUT_DIR is set and not equal to "/" (and optionally not "."), then only
run rm -rf bin/ "$OUT_DIR/"; update the invocation around the existing rm -rf
line that references OUT_DIR to perform this guard check first (protecting the
rm -rf operation).
- Line 179: The sed command in make.sh (the line invoking sed -i.bak "s|replace
github.com/thunder-id/thunderid => $THUNDER_MODULE .*|replace
github.com/thunder-id/thunderid => $THUNDER_MODULE $version|" go.mod) is
BSD-specific and may fail on GNU sed; replace it with a portable approach that
does not rely on sed -i flags (e.g., run sed without in-place editing to write
to a temporary file and then atomically move the temp back to go.mod, or
implement a fallback that tries BSD-style and then GNU-style), ensuring the
substitution pattern and variables ($THUNDER_MODULE and $version) remain
unchanged and no data loss occurs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: cf22bce0-b796-4927-ac93-fc210fc4c5e5

📥 Commits

Reviewing files that changed from the base of the PR and between 7887da6 and 4cce544.

📒 Files selected for processing (3)
  • esignet-service/Makefile
  • esignet-service/README.md
  • esignet-service/make.sh
💤 Files with no reviewable changes (1)
  • esignet-service/Makefile

Comment thread esignet-service/make.sh
Comment thread esignet-service/make.sh
Comment thread esignet-service/make.sh Outdated
Comment thread esignet-service/make.sh Outdated
Signed-off-by: Sachin Rana <sacrana324@gmail.com>
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.

Add cross-platform bash script equivalent of esignet-service/Makefile (Linux + Windows Git Bash)

1 participant