Skip to content

feat: add example/ project for manual testing and pub.dev showcase#11

Merged
rania-run merged 2 commits intodevfrom
feature/3-example-project
Feb 27, 2026
Merged

feat: add example/ project for manual testing and pub.dev showcase#11
rania-run merged 2 commits intodevfrom
feature/3-example-project

Conversation

@rania-run
Copy link
Owner

Summary

  • Adds example/pubspec.yaml — minimal pubspec at 1.0.0+1 for fro to parse
  • Adds example/setup.sh — reset script that wipes .git and re-seeds historical tags (prod-v0.9.0+3, prod-us-v0.8.0+2)
  • Adds example/README.md — step-by-step walkthrough with exact expected CLI output for fro check and fro bump

Closes #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+2
  • fro checkpubspec: 1.0.0+1
  • fro check --env=prod → shows ✗ not tagged yet
  • fro bump --env=prod --strategy=patch --no-push → bumps to 1.0.1+4, tag prod-v1.0.1+4
  • fro bump --env=prod-us --strategy=patch --no-push → bumps to 1.0.2+3, tag prod-us-v1.0.2+3
  • bash setup.sh → resets cleanly back to 1.0.0+1

- `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.
Copilot AI review requested due to automatic review settings February 26, 2026 18:23
@rania-run rania-run added type: enhancement New feature or improvement type: docs Documentation only labels Feb 26, 2026
@rania-run rania-run self-assigned this Feb 26, 2026
@github-actions github-actions bot added this to the v0.1.0 milestone Feb 26, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 -i doesn'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.

@rania-run rania-run merged commit 46f2ff5 into dev Feb 27, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Documentation only type: enhancement New feature or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add example/ project for manual testing and pub.dev showcase

2 participants