Merge pull request #48 from discourse/remove_pngcrush_check
Remove old check for pngcrush version
This commit is contained in:
commit
16ab881c2b
|
@ -1,14 +1,4 @@
|
|||
require 'open3'
|
||||
|
||||
module DockerManager::ApplicationHelper
|
||||
def has_latest_pngcrush
|
||||
cmd = 'pngcrush -version'
|
||||
Open3.popen3(cmd) do |stdin, stdout, stderr|
|
||||
pngcrush_version = stderr.read.strip.split(/\s+/)[1][0...-1]
|
||||
@has_latest_pngcrush ||= Gem::Version.new(pngcrush_version) >= Gem::Version.new('1.7.85')
|
||||
end
|
||||
end
|
||||
|
||||
def discourse_root_url
|
||||
Discourse.base_uri
|
||||
end
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
<script>
|
||||
window.Discourse = {
|
||||
hasLatestPngcrush: <%= has_latest_pngcrush %>,
|
||||
rootUrl: '<%= discourse_root_url %>',
|
||||
longPollingBaseUrl: '<%= long_polling_base_url %>',
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,6 @@
|
|||
|
||||
<script>
|
||||
window.Discourse = {
|
||||
hasLatestPngcrush: true,
|
||||
rootUrl: '/',
|
||||
longPollingBaseUrl: '/',
|
||||
|
||||
|
|
|
@ -19,10 +19,6 @@ export default Ember.Route.extend({
|
|||
const applicationController = this.controllerFor('application');
|
||||
controller.setProperties({ model, upgrading: null });
|
||||
|
||||
if(!(window.Discourse && window.Discourse.hasLatestPngcrush)){
|
||||
applicationController.appendBannerHtml("<b>WARNING:</b> You are running an old Docker image, <a href='https://meta.discourse.org/t/how-do-i-update-my-docker-image-to-latest/23325'>please upgrade</a>.");
|
||||
}
|
||||
|
||||
model.forEach(repo => {
|
||||
if (repo.get('upgrading')) {
|
||||
controller.set('upgrading', repo);
|
||||
|
|
Loading…
Reference in New Issue