From 8f3b18f6285ef50ff337b267f300ea9260fe42fb Mon Sep 17 00:00:00 2001 From: Quentin Dufour Date: Tue, 19 Jan 2021 13:31:23 +0100 Subject: [PATCH] Migrate to garage --- .gitignore | 1 + .webpull | 3 --- deploy | 7 +++++++ package-lock.json | 6 +++--- render.js | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) delete mode 100755 .webpull create mode 100755 deploy diff --git a/.gitignore b/.gitignore index 09c4aa8..dcb7644 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ static/ node_modules/ *.swp +.awsclirc diff --git a/.webpull b/.webpull deleted file mode 100755 index 4df1cf1..0000000 --- a/.webpull +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -npm install -node render.js diff --git a/deploy b/deploy new file mode 100755 index 0000000..124cdcd --- /dev/null +++ b/deploy @@ -0,0 +1,7 @@ +#!/bin/bash + +shopt -s expand_aliases +source .awsclirc +npm install +node render.js +awsdf s3 sync static s3://deuxfleurs.fr diff --git a/package-lock.json b/package-lock.json index 6ab16d6..9a2112a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -252,9 +252,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" }, "longest": { "version": "1.0.1", diff --git a/render.js b/render.js index 33ef58a..5de814e 100644 --- a/render.js +++ b/render.js @@ -98,7 +98,7 @@ const propagate_nice_name = prefix => tree => { if (splitted.length > 0) { tree.nice_path = splitted.slice(0, -1) tree.nice_name = splitted[splitted.length - 1].split('.')[0] - tree.url = without_prefix + tree.url = tree.type == 'folder' ? without_prefix + '/' : without_prefix log('[propagate_nice_name]', [...tree.nice_path, tree.nice_name].join('|')) }