Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindierkx committed Nov 11, 2022
1 parent 29b91b8 commit 75de074
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 78 deletions.
90 changes: 13 additions & 77 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,96 +5,32 @@
[![Build Status](https://img.shields.io/github/workflow/status/distortedfusion/laravel-env-management/CI-CD/master?style=flat-square)](https://github.com/distortedfusion/laravel-env-management/actions)
[![Code Coverage](https://img.shields.io/codecov/c/github/distortedfusion/laravel-env-management?style=flat-square&token=JBWSCLFCPW)](https://codecov.io/gh/distortedfusion/laravel-env-management)

A collection of artisan commands for managing environment variables during CI/CD.
A collection of artisan commands for managing environment variables during CI/CD or development.

## Version Compatibility

Laravel | Package
:---------|:----------
6.x | >= 1.0
7.x | >= 1.0

## Installation

Install the package via composer: `composer require distortedfusion/laravel-env-management`

*This package implements Laravel's Package Discovery, no further changes are needed to your application configs. For more information [please refer to the Laravel documentation](https://laravel.com/docs/packages#package-discovery).*

### Configuration

In order to edit the default configuration you need to publish the package configuration to your application config directory:

```sh
php artisan vendor:publish --tag=df-env-config
```

The config file will be published in config/env-management.php.

### Disabling commands

After publishing the package config, open `config/env-management.php` and look for the `commands` array.
Simply remove or comment out the command you don't want to be loaded.

## Available commands

All commands are enabled by default, refer to [disabling commands](https://github.com/distortedfusion/laravel-env-management#disabling-commands) if you don't require all commands.

---
### `app:url` - Set the application url

Setting a dynamic url during continuous deployment might be useful when, for example, you're running multiple installations per feature branch on dedicated sub-domains.

**Usage**

To set an app url, simply run:
```sh
php artisan app:url http://staging.app.dev
```bash
php artisan env:set APP_NAME "Distorted Fusion"
```
---
### `app:version` - Get or set the application version

Setting an application version isn't a built in Laravel feature.

**Please note:** For this command you need to make changes to your application!

- Add `APP_VERSION=` to your `.env` file, this is used to permanently store the application version.
- Add the `version` config variable to your `config/app.php` like, `'version' => env('APP_VERSION'),`.
## Documentation

**Usage**

To set a version, simply run:
```sh
php artisan app:version 1.0.0
```

Running the command without specifying a version returns the currently set version:
```sh
php artisan app:version
```
---
### `key:set` - Set the application key

Setting an existing application key during continuous deployment is useful when running various instances of the same application with a shared backend. Or different applications that share the same session store.

**Usage**

To set an existing app key, simply run:
```sh
php artisan key:set base64:SGVsbG8gV29ybGQh
```
---
You will find full documentation on the dedicated [documentation](https://distortedfusion.com/docs/distortedfusion/laravel-env-management) site.

## Testing

To run the tests, run the following command from the project folder.
To run the tests, run the following command from the project folder:

``` bash
$ composer test
composer test
```

## Security

If you discover a security vulnerability within this package, please send an e-mail to Kevin Dierkx via kevin@distortedfusion.com. All security vulnerabilities will be promptly addressed.

## Contributing

Contributions are welcome and will be [fully credited](https://github.com/distortedfusion/laravel-env-management/graphs/contributors). Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## License
The MIT License (MIT). Please see [License File](https://github.com/distortedfusion/laravel-env-management/blob/master/LICENSE) for more information.

The MIT License (MIT). Please see [License File](LICENSE) for more information.
6 changes: 5 additions & 1 deletion docs/10-getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Getting Started

A collection of artisan commands for managing environment variables during CI/CD.
A collection of artisan commands for managing environment variables during CI/CD or development.

```bash
php artisan env:set APP_NAME "Distorted Fusion"
```

## Installation

Expand Down

0 comments on commit 75de074

Please sign in to comment.