承接 bitboss-hub/git-version-output 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bitboss-hub/git-version-output

最新稳定版本:v0.2.5

Composer 安装命令:

composer require bitboss-hub/git-version-output

包简介

Nothing for now

README 文档

README

A helper class to get the current git version of the project.

Expects either a version file to exist in the base_path() of your project containing a version string, or the git binary to be available.

Installation

Require it in your Laravel/Lumen project:

composer require bitboss-hub/laravel-git-version-output

Optional packages

This module uses Symfony's Process component if available, or falls back to shell_exec otherwise. So if your deployment environment has shell_exec disabled, you can work around this by installing symfony/process.

Use

You can get the git version array with

\BitBossHub\LaravelGitVersionOutput\GitVersionOutputHelper::getInformations()

It will output an array

  "app_name" => "Laravel"
  "tag" => "v1.0"
  "commit" => "g796af4b6"
  "since_tag" => "5009"
  "build_date" => "2023-12-21 10:26:47"

The app's name is taken from Config::get('app.name', 'app'), so you can configure it in your config/app.php file or leave it as the default of app.

Recommended usage pattern

Ensure your git tags are pushed to your servers so that the versions are described properly.

During development and possibly in staging environments allow the version to be determined automatically (this is done via git describe).

How it works

The first time this package is called, it creates a version file to your project directory.

When this version file exists the package will use its contents.

Ensure to add it to the .gitignore file so your working tree stays clean and you don't accidentally commit it.

As part of your production deployment procedure remember to delete this file every time a new deploy is executed.

统计信息

  • 总下载量: 142
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-21