Skip to content

Commit

Permalink
Merge pull request #67 from thathoff/release-3.0.3
Browse files Browse the repository at this point in the history
Release 3.0.3
  • Loading branch information
thathoff authored Jul 12, 2020
2 parents 7c1afb7 + 1356d79 commit acb6593
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 27 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
<a name="3.0.3"></a>
# [3.0.3](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.2...v3.0.3) (2020-07-12)

The maintainer has switched, be prepared for config option name changes in version 4 which will be released shortly.

### Bug Fixes

* Plugin works with Kirby 3.4 (#66)

<a name="3.0.2"></a>
# [3.0.1](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.2...v3.0.1) (2020-03-06)
# [3.0.2](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.1...v3.0.2) (2020-03-06)

### Bug Fixes

* Only handle files attached to pages


<a name="3.0.1"></a>
# [3.0.1](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.1...v3.0.0) (2019-09-24)
# [3.0.1](https://github.com/blankogmbh/kirby-git-commit-and-push-content/compare/v3.0.0...v3.0.1) (2019-09-24)

### Bug Fixes

Expand Down
50 changes: 25 additions & 25 deletions src/KirbyGit.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function getHooks()
/*
* Site
*/
'site.update:after' => function ($site) use ($gitHelper) {
'site.update:after' => function () use ($gitHelper) {
$gitHelper->kirbyChange('update(site)');
},

Expand All @@ -86,26 +86,26 @@ public function getHooks()
'page.create:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('create(page): ' . $page->uri());
},
'page.update:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $page->uri());
'page.update:after' => function ($newPage) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $newPage->uri());
},
'page.delete:after' => function ($status, $page) use ($gitHelper) {
$gitHelper->kirbyChange('delete(page): ' . $page->uri());
},
'page.changeNum:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('sort(page): ' . $page->uri());
'page.changeNum:after' => function ($newPage) use ($gitHelper) {
$gitHelper->kirbyChange('sort(page): ' . $newPage->uri());
},
'page.changeSlug:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $page->uri());
'page.changeSlug:after' => function ($newPage) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $newPage->uri());
},
'page.changeStatus:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $page->uri());
'page.changeStatus:after' => function ($newPage) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $newPage->uri());
},
'page.changeTemplate:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $page->uri());
'page.changeTemplate:after' => function ($newPage) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $newPage->uri());
},
'page.changeTitle:after' => function ($page) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $page->uri());
'page.changeTitle:after' => function ($newPage) use ($gitHelper) {
$gitHelper->kirbyChange('update(page): ' . $newPage->uri());
},

/*
Expand All @@ -118,33 +118,33 @@ public function getHooks()

$gitHelper->kirbyChange('create(file): ' . $file->page()->uri() . '/' . $file->filename());
},
'file.replace:after' => function ($file) use ($gitHelper) {
if (!$file->page()) {
'file.replace:after' => function ($newFile) use ($gitHelper) {
if (!$newFile->page()) {
return;
}

$gitHelper->kirbyChange('replace(file): ' . $file->page()->uri() . '/' . $file->filename());
$gitHelper->kirbyChange('replace(file): ' . $newFile->page()->uri() . '/' . $newFile->filename());
},
'file.changeName:after' => function ($file) use ($gitHelper) {
if (!$file->page()) {
'file.changeName:after' => function ($newFile) use ($gitHelper) {
if (!$newFile->page()) {
return;
}

$gitHelper->kirbyChange('rename(file): ' . $file->page()->uri() . '/' . $file->filename());
$gitHelper->kirbyChange('rename(file): ' . $newFile->page()->uri() . '/' . $newFile->filename());
},
'file.update:after' => function ($file) use ($gitHelper) {
if (!$file->page()) {
'file.update:after' => function ($newFile) use ($gitHelper) {
if (!$newFile->page()) {
return;
}

$gitHelper->kirbyChange('update(file): ' . $file->page()->uri() . '/' . $file->filename());
$gitHelper->kirbyChange('update(file): ' . $newFile->page()->uri() . '/' . $newFile->filename());
},
'file.changeSort:after' => function ($file) use ($gitHelper) {
if (!$file->page()) {
'file.changeSort:after' => function ($newFile) use ($gitHelper) {
if (!$newFile->page()) {
return;
}

$gitHelper->kirbyChange('sort(file): ' . $file->page()->uri() . '/' . $file->filename());
$gitHelper->kirbyChange('sort(file): ' . $newFile->page()->uri() . '/' . $newFile->filename());
},
'file.delete:after' => function ($status, $file) use ($gitHelper) {
if (!$file->page()) {
Expand Down

0 comments on commit acb6593

Please sign in to comment.