2.1.6 • Published 4 years ago

gcloud-storage-upload v2.1.6

Weekly downloads
18
License
ISC
Repository
github
Last release
4 years ago

Uploads a folder to google cloud storage

Install

npm install gcloud-storage-upload

It's not meant to be installed globally at the moment.

A .gcloud.json must be present in the root folder of the project. This is basically the file you get when you create your credentials in the console of google cloud storage. Plus some extra content for convenience.

{
  "private_key_id": "PRIVTAE KEY ID",
  "private_key": "PRIVATE KEY",
  "client_email": "ID@developer.gserviceaccount.com",
  "client_id": "ID.apps.googleusercontent.com",
  "type": "service_account",
  "projectId": "PROJECT ID",
  "bucket": "BUCKET NAME",
  "remotePath": "PATH INSIDE THE BUCKET",
  "versionNumber": "ADDITIONAL SUBPATH INSIDE THE BUCKET (optional)^"
  "slackWebHook": "SLACK WEB HOOK (optional)",
  "slackChannel": "SLACK CHANNEL TO POST TO (optional, can be set/overwritten by commandline)",
  "metadata": "METADATA FOR UPLOADED FILES (optional, default is {cacheControl: 'no-cache'})",
  "gzipExtensions": "OPTIONAL ARRAY OF FILE EXTENSIONS WHICH SHOULD BE UPLOADED WITH GZIP CONTENT ENCODING: ['js', 'css', 'html', 'csv'] "
}

Usage

Just run gcloud-storage-upload inside your npm scripts as applicable.

The options available:

  • -s, --slack-channel <slack-channel>
  • -p, --path <local-path>
  • -r, --remotePath <remote-path>
  • -c, --configFile <path-to-config>

All files in path directory will be uploaded to remotePath given in .gcloud.json or via the options. The slack channel is optional.

The options overwrite the .gcloud.json settings.

2.1.6

4 years ago

2.1.5

4 years ago

2.1.4

5 years ago

2.1.3

5 years ago

2.1.2

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.0

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.2.0

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

9 years ago

0.0.9

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.2

9 years ago

0.0.2-0

9 years ago

0.0.1

9 years ago

0.0.1-1

9 years ago