goreleaser release --snapshot --clean
rage --help
rage generate module [--with-tests]
rage generate handler
rage generate middleware
rage generate router
rage generate docs
rage generate docker
rage generate cicd [--provider github|gitlab]
tar xzf rage_Darwin_arm64.tar.gz # Replace with your downloaded file
unzip rage_Windows_x86_64.zip # Replace with your downloaded file
sudo mv rage /usr/local/bin/
rage --help
To test your Rage CLI locally without releasing, you can:
- Build and run locally:
# From the project root
go build -o rage- Make it executable and available in your PATH temporarily:
# Make executable
chmod +x rage
# Add current directory to PATH temporarily
export PATH=$PATH:$(pwd)- Test different commands:
# Test help
rage --help
# Test module generation
rage generate module user --with-tests
# Test handler generation
rage generate handler payment
# Test infrastructure generation
rage generate docker
rage generate cicd --provider github- Check generated files:
# After generating a module
ls -R modules/user/
# After generating Docker files
ls Dockerfile docker-compose.yml .dockerignore
# After generating CI/CD
ls .github/workflows/ci.yml- Verify template rendering:
- Check if all variables are properly replaced
- Ensure file paths are correct
- Verify imports are working
- Check if the generated code compiles
- Test the generated project:
# If you generated a new project
go mod tidy
go build ./...
go test ./...If you encounter any issues:
- Check template paths in generator files
- Verify template syntax
- Check file permissions
- Look for any error messages in the output
Remember to clean up test files after verification:
# Remove test files
rm -rf modules/
rm -f Dockerfile docker-compose.yml .dockerignore
rm -rf .github/This way, you can verify all functionality works correctly before creating a release.
I'll help you test your new changes locally with a different binary name. Here's how:
- Build with a different name:
# From the project root
go build -o rage-s- Make it executable:
chmod +x rage-s- Move to a directory in your PATH (keeping your existing rage installation untouched):
sudo mv rage-s /usr/local/bin/- Verify the new command is available:
rage-s --helpNow you can:
- Use
ragefor your stable version from releases - Use
rage-sfor testing your new changes
To test the new features:
# Test module generation
rage-s generate module user --with-tests
# Test infrastructure generation
rage-s generate docker
rage-s generate cicd --provider githubIf you want to remove the test version later:
sudo rm /usr/local/bin/rage-sThis approach allows you to:
- Keep your stable version intact
- Test new changes safely
- Run both versions side by side
- Easily clean up the test version