feat: add example/ project for manual testing and pub.dev showcase#11
Merged
feat: add example/ project for manual testing and pub.dev showcase#11
Conversation
- `fro bump` now displays a summary of the current version, the next version, and the generated tag. - It then prompts for user confirmation before applying the version bump to `pubspec.yaml` and creating the git tag. - The `example/` directory is now treated as a nested git repository to better simulate real-world usage. - Documentation in `example/README.md` has been updated to reflect the new interactive output.
There was a problem hiding this comment.
Pull request overview
This pull request adds an example/ directory to demonstrate the fro CLI tool for managing Flutter app versions and git tags across environments. The example provides a reproducible test environment with historical git tags and step-by-step documentation, which will be displayed on pub.dev under the Example tab.
Changes:
- Adds minimal example project with pubspec.yaml, setup script, and comprehensive walkthrough documentation
- Configures git ignore and IDE settings to support nested git repository in example/ directory
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| example/pubspec.yaml | Minimal pubspec at version 1.0.0+1 for demonstrating fro CLI commands |
| example/setup.sh | Reset script that reinitializes git repo with historical tags (prod-v0.9.0+3, prod-us-v0.8.0+2) |
| example/README.md | Complete walkthrough with commands and expected outputs for fro check and fro bump |
| .gitignore | Excludes example/.git/ directory so parent repo tracks example files as regular files |
| .idea/vcs.xml | Adds VCS mapping for nested example git repository in IDE configuration |
Files not reviewed (1)
- .idea/vcs.xml: Language not supported
Comments suppressed due to low confidence (2)
example/setup.sh:18
- The
sed -i ''syntax is macOS/BSD-specific and will fail on Linux systems. On Linux,sed -idoesn't accept an empty string argument. Consider using a portable approach such as creating a temporary file or using a cross-platform tool. One portable solution is:sed 's/^version: .*/version: 1.0.0+1/' pubspec.yaml > pubspec.yaml.tmp && mv pubspec.yaml.tmp pubspec.yaml
sed -i '' 's/^version: .*/version: 1.0.0+1/' pubspec.yaml
example/README.md:54
- The expected output shows extra spacing after "pubspec:" to align with "git/prod:", but the actual CLI output from check_command.dart does not include this alignment spacing. The actual output would be "pubspec: 1.0.0+1" (one space) not "pubspec: 1.0.0+1" (three spaces). The same applies to line 54 where "git/prod:" should have one space after the colon, not two.
pubspec: 1.0.0+1
git/prod: 0.9.0+3 ✗ not tagged yet
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
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.
Summary
example/pubspec.yaml— minimal pubspec at1.0.0+1forfroto parseexample/setup.sh— reset script that wipes.gitand re-seeds historical tags (prod-v0.9.0+3,prod-us-v0.8.0+2)example/README.md— step-by-step walkthrough with exact expected CLI output forfro checkandfro bumpCloses #3
Test plan
cd example && git init -b main && git add . && git commit -m "chore: initial example project" && git tag prod-v0.9.0+3 && git tag prod-us-v0.8.0+2fro check→pubspec: 1.0.0+1fro check --env=prod→ shows✗ not tagged yetfro bump --env=prod --strategy=patch --no-push→ bumps to1.0.1+4, tagprod-v1.0.1+4fro bump --env=prod-us --strategy=patch --no-push→ bumps to1.0.2+3, tagprod-us-v1.0.2+3bash setup.sh→ resets cleanly back to1.0.0+1