git_stamp 2.7.0
git_stamp: ^2.7.0 copied to clipboard
A tool to generate a git history that you can see when you run the application.
Git Stamp 🏷 #
Build-Time Git History Integration in Your Flutter App #
🏞️ Preview #
Light | Dark |
---|---|
![]() |
![]() |
🛠️ Installation #
dev_dependencies:
git_stamp: ^2.6.0
dependencies:
url_launcher: ^6.2.3
dev_dependencies:
git_stamp:
git:
url: https://github.com/arononak/git_stamp
ref: main
🏗️ Generating Files #
CLI Command | Build type | Use url_launcher |
---|---|---|
dart pub run git_stamp |
LITE | DISABLED |
dart pub run git_stamp --buildtype full --url_launcher enabled |
FULL | ENABLED |
Caution
Generating requires the use of the git
command-line interface (CLI).
Important
If you use Github Action, you only get a single commit because GitHub Actions by default only retrieves the latest version (single commit) and does not include the full history of the repository. This is normal behavior to optimize the build process and improve performance, especially for large repositories. Try configuring github actions or generating Git Stamp files before git push
.
|-- android/
|-- assets/
|-- build/
|-- ios/
|-- lib/
| |-- git_stamp/
| |-- data/
| |-- branch_output.dart
| |-- build_date_time_output.dart
| |-- build_system_info_output.dart
| |-- creation_date_output.dart
| |-- diff_output.dart
| |-- generated_version.dart
| |-- json_output.dart
| |-- repo_path_output.dart
| |-- git_stamp_commit.dart
| |-- git_stamp_details_page.dart
| |-- git_stamp_launcher.dart
| |-- git_stamp_page.dart
| |-- git_stamp_utils.dart
| |-- git_stamp.dart
| |-- main.dart
|-- linux/
|-- macos/
|-- test/
|-- web/
|-- windows/
|-- pubspec.yaml
💻 Usage #
Default usage: #
if (isProd == false) ...[
IconButton(
onPressed: () => showGitStampPage(context: context),
icon: const Icon(Icons.book),
),
],
Advanced usage: #
Central GitStamp node:
class GitStamp {
static const buildBranch = generatedBuildBranch;
static const buildDateTime = generatedBuildDateTime;
static const buildSystemInfo = generatedBuildSystemInfo;
static const repoCreationDate = generatedRepoCreationDate;
static const diffOutput = generatedDiffOutput;
static const isLiteVersion = generatedIsLiteVersion;
static const jsonOutput = generatedJsonOutput;
static const repoPath = generatedRepoPath;
}
Example usage:
import 'git_stamp.dart';
Text(GitStamp.buildDateTime),
🔧 Development - Git Stamp (TODO) #
Step | Description |
---|---|
🔧 Run pana command |
Check 140/140 points |
📸 New SS | Create a new screenshots |
🔍 Generated file names | In README.md |
🏷️ New tag and push | Deploy every Wednesday ! |
📝 License #
Note
Copyright © 2024 Aron Onak. All rights reserved.
Licensed under the MIT license.
If you have any feedback, please contact me at arononak@gmail.com