Skip to content

Commit

Permalink
fix: customization for personal use
Browse files Browse the repository at this point in the history
  • Loading branch information
sooluh committed Feb 22, 2024
1 parent a5dac8f commit 2484d22
Show file tree
Hide file tree
Showing 63 changed files with 2,134 additions and 7,271 deletions.
4 changes: 0 additions & 4 deletions .codacy.yml

This file was deleted.

12 changes: 6 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/.styleci.yml export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/.styleci.yml export-ignore
/tests export-ignore
/.editorconfig export-ignore
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

29 changes: 0 additions & 29 deletions .github/dependabot.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/auto-merge.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/tests.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
build
clover.xml
composer.lock
vendor
.phpunit.result.cache
6 changes: 0 additions & 6 deletions .styleci.yml

This file was deleted.

14 changes: 0 additions & 14 deletions CONTRIBUTING.md

This file was deleted.

23 changes: 6 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Laravel Application Self-Updater

[![Latest Stable Version](https://poser.pugx.org/codedge/laravel-selfupdater/v/stable?format=flat-square)](https://packagist.org/packages/codedge/laravel-selfupdater)
[![Total Downloads](https://poser.pugx.org/codedge/laravel-selfupdater/downloads?format=flat-square)](https://packagist.org/packages/codedge/laravel-selfupdater)
[![](https://github.com/codedge/laravel-selfupdater/workflows/Tests/badge.svg)](https://github.com/codedge/laravel-selfupdater/actions)
[![StyleCI](https://styleci.io/repos/64463948/shield)](https://styleci.io/repos/64463948)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/dd836e58656b4e25b34b2a4ac8197142)](https://www.codacy.com/app/codedge/laravel-selfupdater?utm_source=github.com&utm_medium=referral&utm_content=codedge/laravel-selfupdater)
[![codecov](https://codecov.io/gh/codedge/laravel-selfupdater/branch/master/graph/badge.svg)](https://codecov.io/gh/codedge/laravel-selfupdater)

This package provides some basic methods to implement a self updating
functionality for your Laravel application.

Expand All @@ -18,22 +11,22 @@ functionality for your Laravel application.
- Http-based archives

Usually you need this when distributing a self-hosted Laravel application
that needs some updating mechanism without [Composer](https://getcomposer.org/).
that needs some updating mechanism without Composer.

## Install

To install the latest version from the master using [Composer](https://getcomposer.org/):
To install the latest version from the master using Composer:

```sh
$ composer require codedge/laravel-selfupdater
$ composer require qopiku/laravel-selfupdater
```

## Configuration

After installing the package you need to publish the configuration file via

```sh
$ php artisan vendor:publish --provider="Codedge\Updater\UpdaterServiceProvider"
$ php artisan vendor:publish --provider="Qopiku\Updater\UpdaterServiceProvider"
```

**Note:** Please enter correct value for vendor and repository name in your `config/self-updater.php` if you want to use Github as source for your updates.
Expand Down Expand Up @@ -111,11 +104,9 @@ a `private_access_token` field, where you can set the token.
To start an update process, i. e. in a controller, just use:

```php
Route::get('/', function (\Codedge\Updater\UpdaterManager $updater) {

Route::get('/', function (\Qopiku\Updater\UpdaterManager $updater) {
// Check if new version is available
if($updater->source()->isNewVersionAvailable()) {

// Get the current installed version
echo $updater->source()->getVersionInstalled();

Expand All @@ -127,11 +118,9 @@ Route::get('/', function (\Codedge\Updater\UpdaterManager $updater) {

// Run the update process
$updater->source()->update($release);

} else {
echo "No new version available.";
}

});
```

Expand All @@ -152,7 +141,7 @@ This is the default. Updates will be fetched by using a tagged commit, aka relea

#### Branch-based updates

Select the branch that should be used via the `use_branch` setting [inside the configuration](https://github.com/codedge/laravel-selfupdater/blob/master/config/self-update.php).
Select the branch that should be used via the `use_branch` setting [inside the configuration](https://github.com/qopiku/laravel-selfupdater/blob/master/config/self-update.php).

```php
// ...
Expand Down
37 changes: 11 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "codedge/laravel-selfupdater",
"name": "qopiku/laravel-selfupdater",
"description": "Providing an auto-updating functionality for your self-hosted Laravel application.",
"license": "MIT",
"keywords": [
Expand All @@ -21,61 +21,46 @@
}
],
"support": {
"issues": "https://github.com/codedge/laravel-selfupdater/issues",
"source": "https://github.com/codedge/laravel-selfupdater"
"issues": "https://github.com/qopiku/laravel-selfupdater/issues",
"source": "https://github.com/qopiku/laravel-selfupdater"
},
"require": {
"php": "^8.1",
"ext-json": "*",
"ext-zip": "*",
"guzzlehttp/guzzle": "^7.5.0",
"illuminate/support": "^10",
"league/uri": "~6.7 || ~6.8",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan-phpunit": "^1.2"
},
"require-dev": {
"dg/bypass-finals": "^1.4",
"mikey179/vfsstream": "^1.6",
"mockery/mockery": "^1.5",
"orchestra/testbench": "^8.1",
"phpunit/phpunit": "^9.5.26"
"guzzlehttp/guzzle": "^7.2",
"illuminate/support": "^10.0",
"league/uri": "^7.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"Codedge\\Updater\\": "src/"
"Qopiku\\Updater\\": "src/"
},
"files": [
"src/helpers.php"
]
},
"autoload-dev": {
"psr-4": {
"Codedge\\Updater\\Tests\\": "tests/"
"Qopiku\\Updater\\Tests\\": "tests/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true,
"phpstan/extension-installer": true
"ergebnis/composer-normalize": true
},
"sort-packages": true
},
"extra": {
"laravel": {
"aliases": {
"Updater": "Codedge\\Updater\\UpdaterFacade"
"Updater": "Qopiku\\Updater\\UpdaterFacade"
},
"providers": [
"Codedge\\Updater\\UpdaterServiceProvider"
"Qopiku\\Updater\\UpdaterServiceProvider"
]
}
},
"scripts": {
"phpstan": "./vendor/bin/phpstan",
"test": "./vendor/bin/phpunit",
"test-coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --coverage-html=build/coverage-html"
}
}
Loading

0 comments on commit 2484d22

Please sign in to comment.