Skip to content

Commit

Permalink
v0.7.1
Browse files Browse the repository at this point in the history
release/0.7.1
  • Loading branch information
ashur authored Nov 15, 2016
2 parents 26ebea8 + 7a00e73 commit 7cbf354
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to Pug will be documented in this file (beginning with v0.5 😅).

## [0.7.1] - 2017-11-14
### Fixed
- Iterate through post-update submodule inventory during state restoration
- No longer overwrite invalid path with `false`
- Silently skip projects with file as path

## [0.7.0] - 2017-11-14
### Added
- `pug install`
Expand Down
2 changes: 1 addition & 1 deletion lib/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/*
* Application version
*/
'version' => '0.7.0',
'version' => '0.7.1',

/*
* PHP minimum version
Expand Down
13 changes: 9 additions & 4 deletions lib/pug/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,20 @@ public function updateSubmodules( array $preInventory )
/*
* Restore submodules to previous states as appropriate
*/
foreach( $preInventory as $submoduleName => $preUpdateInfo )
foreach( $postInventory as $submoduleName => $postUpdateInfo )
{
$projectSubmodule = $preUpdateInfo['project'];
$projectSubmodule = $postUpdateInfo['project'];
$pathSubmodule = $projectSubmodule->getPath();

$stringFormatted = new Format\String();
$stringFormatted->foregroundColor( 'blue' );

$postUpdateInfo = $postInventory[$submoduleName];
if( !isset( $preInventory[$submoduleName] ) )
{
continue;
}

$preUpdateInfo = $preInventory[$submoduleName];

/*
* Submodules that were checked out to a branch before the update
Expand Down Expand Up @@ -463,7 +468,7 @@ public function jsonSerialize()
{
return [
'name' => $this->getName(),
'path' => $this->source->getRealPath(),
'path' => $this->source->getPathname(),
'enabled' => $this->enabled,
'updated' => $this->updated
];
Expand Down
10 changes: 9 additions & 1 deletion lib/pug/Pug.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,15 @@ public function __construct()
{
$enabled = isset( $projectInfo['enabled'] ) ? $projectInfo['enabled'] : true;
$updated = isset( $projectInfo['updated'] ) ? $projectInfo['updated'] : null;
$dirProject = new File\Directory( $projectInfo['path'] );

try
{
$dirProject = new File\Directory( $projectInfo['path'] );
}
catch( \Exception $e )
{
continue;
}

$project = new Project( $projectInfo['name'], $dirProject, $enabled, $updated );

Expand Down

0 comments on commit 7cbf354

Please sign in to comment.