From 240280a0aefbf28373a493e0cbb9fa774d07a809 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Thu, 9 Jun 2016 16:59:57 +0100 Subject: [PATCH] get rid of config commands --- server-ce/Gruntfile.coffee | 42 +++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 23 deletions(-) diff --git a/server-ce/Gruntfile.coffee b/server-ce/Gruntfile.coffee index f65d28c893..01a31e5370 100644 --- a/server-ce/Gruntfile.coffee +++ b/server-ce/Gruntfile.coffee @@ -51,7 +51,6 @@ SERVICES = [{ repo: "https://github.com/sharelatex/spelling-sharelatex.git" version: "master" }] - module.exports = (grunt) -> grunt.loadNpmTasks 'grunt-bunyan' grunt.loadNpmTasks 'grunt-execute' @@ -76,7 +75,7 @@ module.exports = (grunt) -> limit: SERVICES.length logConcurrentOutput: true coffee: - migrate: + migrate: expand: true, flatten: false, cwd: './', @@ -109,9 +108,8 @@ module.exports = (grunt) -> "Misc": [ "help" ] - "Install tasks": ("install:#{service.name}" for service in SERVICES).concat(["install:all", "install", "install:dirs", "install:config"]) + "Install tasks": ("install:#{service.name}" for service in SERVICES).concat(["install:all", "install", "install:dirs"]) "Update tasks": ("update:#{service.name}" for service in SERVICES).concat(["update:all", "update"]) - "Config tasks": ["install:config"] "Checks": ["check", "check:redis", "check:latexmk", "check:s3", "check:make"] for service in SERVICES @@ -127,14 +125,13 @@ module.exports = (grunt) -> done = @async() Helpers.createNewRelease(service, grunt.option("release"), done) - grunt.registerTask 'install:config', "Copy the example config into the real config", () -> - Helpers.installConfig @async() + grunt.registerTask 'install:dirs', "Copy the example config into the real config", () -> Helpers.createDataDirs @async() grunt.registerTask 'install:all', "Download and set up all ShareLaTeX services", ["check:make"].concat( ("install:#{service.name}" for service in SERVICES) - ).concat(["install:config", "install:dirs"]) + ).concat([ "install:dirs"]) grunt.registerTask 'install', 'install:all' grunt.registerTask 'update:all', "Checkout and update all ShareLaTeX services", ["check:make"].concat( @@ -214,7 +211,7 @@ module.exports = (grunt) -> proc = spawn "git", ["pull"], cwd: dir, stdio: "inherit" proc.on "close", () -> callback() - + createNewRelease: (service, version, callback = (error) ->) -> dir = service.name proc = spawn "sed", [ @@ -307,9 +304,9 @@ module.exports = (grunt) -> latexmk comes with TexLive 2013, and must be a version from 2013 or later. If you have already have TeXLive installed, then make sure it is included in your PATH (example for 64-bit linux): - + export PATH=$PATH:/usr/local/texlive/2014/bin/x86_64-linux/ - + This is a not a fatal error, but compiling will not work without latexmk. """ return callback(error) @@ -334,7 +331,7 @@ module.exports = (grunt) -> """ error = new Error("latexmk is too old") callback(error) - + checkAspell: (callback = (error) ->) -> grunt.log.write "Checking aspell is installed... " exec "aspell dump dicts", (error, stdout, stderr) -> @@ -342,15 +339,15 @@ module.exports = (grunt) -> grunt.log.error "FAIL." grunt.log.errorlns """ Either aspell is not installed or is not in your PATH. - + On Ubuntu you can install aspell with: - + sudo apt-get install aspell - + Or on a mac: - + brew install aspell - + This is not a fatal error, but the spell-checker will not work without aspell """ return callback(error) @@ -382,11 +379,11 @@ module.exports = (grunt) -> Please configure your Amazon S3 credentials in config/settings.development.coffee Amazon S3 (Simple Storage Service) is a cloud storage service provided by - Amazon. ShareLaTeX uses S3 for storing binary files like images. You can + Amazon. ShareLaTeX uses S3 for storing binary files like images. You can sign up for an account and find out more at: http://aws.amazon.com/s3/ - + """ return callback() client.getFile "does-not-exist", (error, response) -> @@ -413,7 +410,7 @@ module.exports = (grunt) -> else grunt.log.error "FAIL." grunt.log.errorlns """ - Could not find directory "#{Settings.filestore.stores.user_files}". + Could not find directory "#{Settings.filestore.stores.user_files}". Please check your configuration. """ callback() @@ -428,11 +425,11 @@ module.exports = (grunt) -> grunt.log.error "FAIL." grunt.log.errorlns """ Either make is not installed or is not in your path. - + On Ubuntu you can install make with: - + sudo apt-get install build-essential - + """ return callback(error) else if error? @@ -445,4 +442,3 @@ module.exports = (grunt) -> template = fs.readFileSync("package/upstart/sharelatex-template.conf").toString() for service in SERVICES fs.writeFileSync "package/upstart/sharelatex-#{service.name}.conf", template.replace(/__SERVICE__/g, service.name) -