git_stamp 2.8.0
git_stamp: ^2.8.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 #
Table of contents #
🏞️ Preview #
Light | Dark |
---|---|
![]() |
![]() |
🛠️ Installation #
dart pub add git_stamp
or
dev_dependencies:
git_stamp: ^2.6.0
or
dependencies:
url_launcher: ^6.2.3
dev_dependencies:
git_stamp:
git:
url: https://github.com/arononak/git_stamp
ref: main
🏗️ Generating #
CLI Command | Build type | Use url_launcher |
---|---|---|
dart run git_stamp |
LITE | DISABLED |
dart 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
static const buildDateTime
static const buildSystemInfo
static const repoCreationDate
static const diffOutput
static const isLiteVersion
static const jsonOutput
static const repoPath
static List<GitStampCommit> commitList
static GitStampCommit latestCommit;
}
Example usage:
import 'git_stamp.dart';
Text(GitStamp.latestCommit.hash),
🔧 Development #
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