{"id":19450894,"url":"https://github.com/morning-train/laravel-deployment","last_synced_at":"2025-04-25T03:32:10.390Z","repository":{"id":62550463,"uuid":"499109173","full_name":"Morning-Train/laravel-deployment","owner":"Morning-Train","description":"A package to parse a file for version/deployment information.","archived":false,"fork":false,"pushed_at":"2022-06-02T13:29:32.000Z","size":22,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-03T15:43:58.249Z","etag":null,"topics":["laravel","laravel-package"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Morning-Train.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-02T11:33:07.000Z","updated_at":"2022-06-02T13:33:41.000Z","dependencies_parsed_at":"2022-11-03T01:45:59.672Z","dependency_job_id":null,"html_url":"https://github.com/Morning-Train/laravel-deployment","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Flaravel-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Flaravel-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Flaravel-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Morning-Train%2Flaravel-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Morning-Train","download_url":"https://codeload.github.com/Morning-Train/laravel-deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250748110,"owners_count":21480780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["laravel","laravel-package"],"created_at":"2024-11-10T16:39:22.802Z","updated_at":"2025-04-25T03:32:10.130Z","avatar_url":"https://github.com/Morning-Train.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deployment\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/morningtrain/laravel-deployment.svg?style=flat-square)](https://packagist.org/packages/morningtrain/laravel-deployment)\n[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/Morning-Train/laravel-deployment/run-tests?label=tests)](https://github.com/Morning-Train/laravel-deployment/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/Morning-Train/laravel-deployment/Check%20\u0026%20fix%20styling?label=code%20style)](https://github.com/Morning-Train/laravel-deployment/actions?query=workflow%3A\"Check+%26+fix+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/morningtrain/laravel-deployment.svg?style=flat-square)](https://packagist.org/packages/morningtrain/laravel-deployment)\n\nA package to parse a file for version/deployment information.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require morningtrain/laravel-deployment\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"deployment-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    /*\n    |--------------------------------------------------------------------------\n    | Deployment JSON File\n    |--------------------------------------------------------------------------\n    |\n    | This value is the path to your JSON file. This value is used by the deployment\n    | parser to know which JSON file to parse and look for deployment information,\n    | to use in your application or provide services like Bugsnag or CI/CD.\n    |\n    */\n\n    'file' =\u003e env('DEPLOYMENT_JSON_FILE_PATH'),\n];\n```\n\n## Deployment.json file\n\nThe `deployment.json` we use, looks like this\n\n```json\n{\n    \"revision\": \"123456789\",\n    \"version\": \"v1.4.0\",\n    \"repository\": \"http://url-to.repository\",\n    \"username\": \"User Name\"\n}\n```\n\nThe package expects the file to match the format, to be able to parse it.\n\n## Usage\n\nGet the version number\n\n```php\nuse Morningtrain\\Deployment\\Facades\\Deployment;\n\nDeployment::version();\n```\n\nGet the username of the committer\n\n```php\nDeployment::username();\n```\n\nGet the revision of the commit\n\n```php\nDeployment::revision();\n```\n\nGet the repository URL\n\n```php\nDeployment::repository();\n```\n\nGet all the data in a Version object\n\n```php\nDeployment::get();\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [Peter Brinck](https://github.com/peterbrinck)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorning-train%2Flaravel-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmorning-train%2Flaravel-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmorning-train%2Flaravel-deployment/lists"}