Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
Last fix for update functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanlesage committed Sep 17, 2016
1 parent 94f83eb commit ee3bb6e
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/APIController.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public function runComposer()
return response()->json(['Composer run successful!', 200]);
}

public function finalize()
public function finalize($version)
{
// Now we should be ready to rumble again -> update the env file
$editor = new EnvEdit();
Expand Down
2 changes: 1 addition & 1 deletion app/Http/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
Route::get ('/api/moveUpdate', 'APIController@moveUpdate');
Route::get ('/api/migrateDatabase', 'APIController@migrateDatabase');
Route::get ('/api/runComposer', 'APIController@runComposer');
Route::get ('/api/finalize', 'APIController@finalize');
Route::get ('/api/finalize/{version}', 'APIController@finalize');
});


Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v0.1.4

* Minor patch for the last dependency issues

# v0.1.3

* Fixed dependency issues with the new UpdateController
* Added capability of automated updates

# v.0.1.2

* Fixed an error that in "closed editing mode" (Guests are not able to edit),
Expand Down
20 changes: 20 additions & 0 deletions resources/assets/less/classes.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@
right:20px;
}

.bg-primary {
background-color:@color-primary;
}

.bg-warning {
background-color:@color-warning;
}

.bg-error {
background-color:@color-error;
}

.bg-success {
background-color:@color-success;
}

.bg-muted {
background-color:@color-muted;
}

/*
************************
**** Button classes ****
Expand Down
12 changes: 6 additions & 6 deletions resources/views/admin/updates.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@
{{ trans('ui.backend.updates.patch', ['current' => env('APP_VERSION', 'v0.0.0'), 'new' => $newVersion, 'published' => $published]) }}
</div>
@endif
<div>
{!! $changelog or '' !!}
</div>
<p>
<a id="commenceUpdate">{{ trans('ui.backend.updates.commence') }}</a>
</p>
Expand All @@ -31,6 +28,9 @@
<ul id="updateProgress">
</ul>
</div>
<div>
{!! $changelog or '' !!}
</div>
@else
<div class="alert muted">
{{ trans('ui.backend.updates.none', ['current' => env('APP_VERSION', 'v0.0.0')]) }}
Expand Down Expand Up @@ -107,7 +107,7 @@
// This will be passed to the setup.php as an action to execute
'action': 'finalize',
// In this variable the retrieved input will be put.
'argv': ''
'argv': "{{ $newVersion }}"
},
];
Expand Down Expand Up @@ -148,13 +148,13 @@ function Updater(steps)
// Call the controller and execute action
$.get("{{ url('/admin/api/')}}/" + step.action + "/" + step.argv, function() {})
.done($.proxy(function(data) {
$('#next').text(data[0]).addClass('success');
$('#next').text(data[0]).addClass('bg-success');
$('#next').attr('id', '');
this.goodtogo = true;
this.next();
}, this))
.fail($.proxy(function(data) {
$('#next').text(data[0]).addClass('error');
$('#next').text(data[0]).addClass('bg-error');
}, this));
} else {
// No action required -> commence the next step
Expand Down

0 comments on commit ee3bb6e

Please sign in to comment.