{"id":13629630,"url":"https://github.com/bufferapp/buffer-static-upload","last_synced_at":"2025-04-19T16:44:38.136Z","repository":{"id":146339811,"uuid":"92453866","full_name":"bufferapp/buffer-static-upload","owner":"bufferapp","description":"📁→☁️🤘 Making it easy to upload your static assets","archived":false,"fork":false,"pushed_at":"2021-10-20T23:20:40.000Z","size":22,"stargazers_count":4,"open_issues_count":10,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T11:06:18.523Z","etag":null,"topics":["aws","aws-s3","golang","static-assets","upload"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bufferapp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-05-25T23:51:17.000Z","updated_at":"2021-10-20T23:19:13.000Z","dependencies_parsed_at":"2024-01-14T08:01:47.052Z","dependency_job_id":"cc797d39-3a85-48a0-b3d1-82f84e912152","html_url":"https://github.com/bufferapp/buffer-static-upload","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-static-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-static-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-static-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Fbuffer-static-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bufferapp","download_url":"https://codeload.github.com/bufferapp/buffer-static-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249740914,"owners_count":21318717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-s3","golang","static-assets","upload"],"created_at":"2024-08-01T22:01:15.202Z","updated_at":"2025-04-19T16:44:38.114Z","avatar_url":"https://github.com/bufferapp.png","language":"Go","readme":"# buffer-static-upload\n\n[![Build Status](https://travis-ci.com/bufferapp/buffer-static-upload.svg?branch=master)](https://travis-ci.com/bufferapp/buffer-static-upload)\n\nA straightforward static asset uploader which versions files by their contents\nand generates a json file for your application to read the uploaded file\nlocations from.\n\n## Versioned files and Images\n\n`.js` and `.css` files are versioned during upload using a hash of the file's\ncontents as to allow for cache-busting. You can skip the automatic versioning\nby using the `-skip-versioning` flag.\n\nImages and other files are *not* versioned to allow for maximum caching and due\nto their contents not changing very often like `.css` and `.js` files do.\n\n## Install\n\nA pre-compiled binary is available for download for both Linux and macOS.\nReplace the version (ex. `0.2.0`) in the URL below for the version you require:\n\n```\ncurl -L https://github.com/bufferapp/buffer-static-upload/releases/download/0.2.0/buffer-static-upload-`uname -s` \u003e /usr/local/bin/buffer-static-upload\nchmod +x /usr/local/bin/buffer-static-upload\n```\n\n## Usage\n\nEnsure your AWS credentials environment variables are set (`AWS_ACCESS_KEY_ID`,\n`AWS_SECRET_ACCESS_KEY`). The cli has the following argument options:\n\n```\n$ buffer-static-upload -h\nUsage of ./buffer-static-upload:\n  -bucket string\n    \tthe s3 bucket to upload to (default \"static.buffer.com\")\n  -dir string\n    \trequired, the directory to upload files to in the bucket\n  -dry-run\n    \tprint the output only, skip file uploads and manifest creation\n  -files string\n    \tthe path to the files you'd like to upload, ex. \"public/**/.*js,public/style.css\"\n  -format string\n    \tformat of the output [json,csv] (default \"json\")\n  -o string\n    \tthe filename for the versions manifest (default \"staticAssets.json\")\n  -skip-versioning\n    \tskip versioning uploaded files\n  -v\tprint the current buffer-static-upload version\n```\n\nFor example, you can use glob patterns to match multiple sets of files:\n\n```\nbuffer-static-upload -files \"public/js/**/*.js,public/css/*.css,public/img/*.*\" -bucket my-bucket\n```\n\nThis will generate a `staticAssets.json` file in this directory like this:\n\n```json\n{\n  \"public/css/style.css\": \"https://my-bucket.s3.amazonaws.com/public/css/style.11985b07e3121564a73d4d6821bfcfe7.css\",\n  \"public/js/x/another.js\": \"https://my-bucket.s3.amazonaws.com/public/js/x/another.bfa2d0f60841707efe7be0a94c4caacf.js\",\n  \"public/js/script.js\": \"https://my-bucket.s3.amazonaws.com/public/js/script.d55002b60fcfff0b3d355184d23af6f7.js\",\n  \"public/img/home.jpg\": \"https://my-bucket.s3.amazonaws.com/public/img/home.jpg\",\n}\n```\n\n*Note* - The default bucket is used by multiple teams, so if you use that you\nmust specify a directory to use for your project as not to create unnecessary\ncollisions.\n\n### Development\n\nTo work on this project you'll need [Golang](https://golang.org/dl/) and\nthe [Glide package manager](https://glide.sh/) installed. You should have\nyour `GOPATH` environment variable set and this repo should be cloned within\nyour `$GOPATH/src/github.com/bufferapp` directory.\n\nTo install the dependencies, run:\n\n```\nglide install\n```\n\nTo test the script run:\n\n```\ngo run main.go \u003cyour cli arguments here\u003e\n```\n\nWhen distributing a new release version, run this script to generate the\nbinaries for Linux and Mac:\n\n```\n./build.sh\n```\n\n### License\n\nMIT\n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fbuffer-static-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbufferapp%2Fbuffer-static-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Fbuffer-static-upload/lists"}