-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/git integration #34
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implemented automatic version detection from git tags and automated CI/CD release workflow: Version Detection: - Modified Makefile to auto-detect git tags as version - Updated build.sh with same git tag detection logic - Version detection priority: exact tag > git describe > "dev" - Automatically strips 'v' prefix from tags (v1.0.0 → 1.0.0) CI/CD Automation: - Created GitHub Actions workflow (.github/workflows/release.yml) - Triggers on git tag push (v*) - Builds binaries for 5 platforms (Linux, macOS, Windows) - Generates SHA256 checksums - Auto-generates release notes from commits - Publishes GitHub Release with all artifacts Documentation: - Added VERSION.md - comprehensive versioning guide - Added RELEASE.md - step-by-step release process - Includes CI/CD workflow documentation Code Quality: - Fixed octal notation in buildsystem.go (0111 → 0o111) Usage: make build # Auto-detects version from git tags make build VERSION=x.y.z # Manual override Release Process: git tag -a v1.0.0 -m "Release version 1.0.0" git push origin v1.0.0 # GitHub Actions handles the rest!
The release workflow was failing with "pattern dist/*: no matching files found" because the Go build process embeds the frontend from web/dist/, but the workflow wasn't building the frontend before building the Go binaries. Added steps to: - Set up Node.js 18 with Yarn cache - Install frontend dependencies with yarn install --frozen-lockfile - Build frontend with yarn build This ensures web/dist/ exists before the Go build embeds it.
Restored the original GitHub Actions workflow that was accidentally simplified, which removed critical functionality: GitHub Actions Workflow (.github/workflows/release.yml): - Restored matrix build strategy for parallel platform builds - Re-added Docker image build and push to Docker Hub - Added workflow_dispatch trigger for manual runs - Added pull_request trigger for testing - Improved release notes with commit history - Added Docker installation instructions to release notes - Integrated git tag-based versioning into matrix builds Makefile Enhancements: - Added build-frontend target to build React web app - Modified build and build-release to depend on build-frontend - Added clean-all target to remove frontend artifacts - Now ensures web/dist/ exists before Go build embeds it Workflow Jobs: 1. build - Matrix build for all platforms with CGO support 2. docker - Build and push multi-arch Docker images 3. release - Create GitHub Release with binaries and notes This ensures both binaries and Docker images are published on release.
Implemented complete git branch management for services:
Backend (Go):
- Added GitBranch field to Service model
- Created git.go with helper functions:
* IsGitRepository() - Check if directory is a git repo
* GetCurrentBranch() - Get active branch
* GetBranches() - List all local branches
* GetRemoteBranches() - List remote branches
* HasUncommittedChanges() - Check for uncommitted work
* SwitchBranch() - Switch to different branch with safety checks
* GetGitInfo() - Comprehensive git repository information
- Added API endpoints:
* GET /api/services/{id}/git/info - Get git info
* GET /api/services/{id}/git/branches - List all branches
* POST /api/services/{id}/git/switch - Switch branch
- Manager methods: GetGitInfo(), GetGitBranches(), SwitchGitBranch()
- Auto-detect and update git branch on service load
Frontend (React/TypeScript):
- Created GitBranchSwitcher component with:
* Branch dropdown selector
* Current branch indicator
* Switch button with confirmation
* Safety check: prevents switching while service is running
* Loading states and error handling
- Integrated GitBranchSwitcher into ServiceCard
- Added gitBranch field to Service type
- Displays branch icon and current branch
- Lists all local and remote branches
Features:
- Automatic branch detection on startup
- Safety checks prevent switching with uncommitted changes
- Prevents branch switch while service is running
- Remote branch tracking (creates local branch if needed)
- Comprehensive error handling and user feedback
- Seamless integration with existing service management
Improve git branch switching UX by replacing the fixed-width dropdown with a full modal dialog that includes search functionality. This provides better handling of long branch names and makes it easier to find specific branches. Changes: - Replace Select dropdown with Modal dialog component - Add search input with real-time filtering of branches - Display full branch names without wrapping using break-all - Show filtered results count during search - Improve visual hierarchy with larger clickable areas - Add "Click to switch" hint for non-current branches - Better warning display when service is running - Fix backend git operations to use full paths via getServiceProjectsDirectory() The dialog provides a much better user experience for repositories with many branches or long branch names.
Fix Alpine Linux apk trigger failures during ARM64 builds by using --no-scripts flag. This avoids the "execve: No such file or directory" error that occurs when running apk triggers under QEMU emulation. Changes: - Add --no-scripts flag to apk command - Manually run update-ca-certificates with error suppression - Ensures successful multi-arch builds (amd64 and arm64)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.