Skip to content

Commit

Permalink
Merge pull request #1239 from OPUS4/update992
Browse files Browse the repository at this point in the history
Fix problem running update scripts (4.8.0.6)
  • Loading branch information
j3nsch authored Aug 27, 2024
2 parents 8edba7e + fc40ee2 commit c9e968e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# OPUS 4 Change Log

## Release 4.8.0.6 - 2024-08-27

https://github.com/OPUS4/application/issues/992

## Release 4.8.0.5 - 2024-03-12

https://github.com/OPUS4/application/issues/1190
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ redevelopment that was created as part of a DFG ([Deutsche Forschungsgemeinschaf
Since then the development has been continued at KOBV ([Kooperativer Bibliotheksverbund Berlin-Brandenburg][KOBV])
mostly.

## OPUS 4.8.0.5 (current version)
## OPUS 4

The current version of OPUS 4 is __4.8.0.5__. It is available on the [master][MASTER] branch and compatible with
The current version of OPUS 4 is __4.8.0.6__. It is available on the [master][MASTER] branch and compatible with
PHP 7.1 to 8.1.

[Documentation][DOC]
Expand Down
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# OPUS 4 Release Notes

## Patch Release 4.8.0.6 - 2024-08-27

Problem bei der Ausführung von PHP Update-Skripten behoben.
https://github.com/OPUS4/application/issues/992

## Patch Release 4.8.0.5 - 2024-03-12

Problem auf manchen Systemen bei der Anzeige von `BelongsToBibliography`
Expand Down
2 changes: 1 addition & 1 deletion application/configs/application.ini
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ name = 'OPUS 4'
logoLink = home
security = 1
workspacePath = APPLICATION_PATH "/workspace"
version = 4.8.0.5
version = 4.8.0.6
update.latestVersionCheckUrl = "https://api.github.com/repos/opus4/application/releases/latest"

; Determines the implementation of the OPUS 4 data model
Expand Down
27 changes: 16 additions & 11 deletions library/Application/Update.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,15 @@
*/
class Application_Update extends Application_Update_PluginAbstract
{
/**
* Path to update scripts.
*
* @var string
*/
/** @var string Path to update scripts. */
private $scriptsPath = '/scripts/update';

/**
* Enables confirmation before an update step is executed.
*
* @var bool
*/
/** @var bool Enables confirmation before an update step is executed. */
private $confirmSteps = false;

/** @var string Shell command for executing scripts. */
private $shellCommand = 'php';

/**
* Bootstrap Zend_Application for update process.
*/
Expand Down Expand Up @@ -205,7 +200,9 @@ public function runScript($script)

$this->log("Running '$basename' ... ");

passthru($script, $exitCode);
$shellCommand = $this->getShellCommand();

passthru("{$shellCommand} {$script}", $exitCode);

if ($exitCode !== 0) {
$message = "Error ($exitCode) running '$basename'!";
Expand Down Expand Up @@ -332,4 +329,12 @@ public function getConfirmSteps()
{
return $this->confirmSteps;
}

/**
* @return string
*/
public function getShellCommand()
{
return $this->shellCommand;
}
}

0 comments on commit c9e968e

Please sign in to comment.