{"id":15641325,"url":"https://github.com/getdave/grunt-deployments","last_synced_at":"2025-10-07T12:35:54.400Z","repository":{"id":8880024,"uuid":"10596458","full_name":"getdave/grunt-deployments","owner":"getdave","description":"MYSQL database deployments using GruntJS","archived":false,"fork":false,"pushed_at":"2016-07-17T16:13:12.000Z","size":693,"stargazers_count":72,"open_issues_count":38,"forks_count":34,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-07T04:53:37.995Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/getdave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-MIT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-06-10T08:44:58.000Z","updated_at":"2023-09-04T02:04:43.000Z","dependencies_parsed_at":"2022-08-28T04:54:31.676Z","dependency_job_id":null,"html_url":"https://github.com/getdave/grunt-deployments","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/getdave/grunt-deployments","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getdave%2Fgrunt-deployments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getdave%2Fgrunt-deployments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getdave%2Fgrunt-deployments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getdave%2Fgrunt-deployments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getdave","download_url":"https://codeload.github.com/getdave/grunt-deployments/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getdave%2Fgrunt-deployments/sbom","scorecard":{"id":424163,"data":{"date":"2025-08-11","repo":{"name":"github.com/getdave/grunt-deployments","commit":"504a50e9ce4367d0ee5e74fd83dd7d18d46ad3e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":1,"reason":"Found 4/29 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-MIT:0","Info: FSF or OSI recognized license: MIT License: LICENSE-MIT:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T01:54:42.571Z","repository_id":8880024,"created_at":"2025-08-19T01:54:42.571Z","updated_at":"2025-08-19T01:54:42.571Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278778295,"owners_count":26044251,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-10-03T11:42:12.323Z","updated_at":"2025-10-07T12:35:54.366Z","avatar_url":"https://github.com/getdave.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Grunt (MYSQL) Database Deployments\n\n\u003e Push/pull MYSQL databases from one location to another using Grunt. Designed to ease the pain of migrating databases from one environment (local) to another environment (remotes). Automatically updates hardcoded siteurl references and backs up source and target before any modificaitions are made.\n\n**IMPORTANT NOTE**: the authors of this Plugin assume **no responsibility** for any actions which result from the usage of this script. You use it entirely *at your own risk*. It is *strongly* recommended that you test the script in a non-critical environment prior to rolling out for production use. *Always* manually backup your local and remote databases before using the script for the first time. No support can be provided for critical situations.\n\n## Getting Started\nThis plugin requires Grunt `~0.4.1`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-deployments --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-deployments');\n```\n\n## Documentation\n\n### Overview\nIn your project's Gruntfile, add a section named `deployments` to the data object passed into `grunt.initConfig()`.\n\nThe task expects a series of `targets`, one for each of the locations which you want to move the database to/from.\n\n```js\ngrunt.initConfig({\n  deployments: {\n    local: {\n\n    },\n    my_target_1: {\n\n    },\n    my_target_2: {\n\n    },\n    // etc\n  }\n});\n```\n\n**IMPORTANT NOTE:** The task is opinionated in that it assumes you are working on a local machine and pushing/pulling databases from/to that location. Thus it is imperative that you define a `local` target as part of your configuration.\n\n\n### Available Tasks\n\nThe Plugin makes two new tasks available via Grunt. These are `db_pull` and `db_push`. The interface for both commands is identical:\n\n````grunt db_pull --target=\"%%TARGET%%\" // replace %%TARGET%% with the target you've defined in your config ````\n\nThere is a single argument `--target` that is required each time you run either command.\n\n#### Task: db_push\n\nThe `db_push` command moves your **local** database to a **remote** database location. The following process is observed:\n\n1. Takes a dump of your local database\n2. Runs a search and replace on the local dump file\n3. Backups up the target database (remote)\n4. Imports the local dump into the target database\n\nThe `target` argument represents the remote target to which you wish to push your database.\n\n````grunt db_push --target=\"develop\"````\n\n#### Task: db_pull\n\nThe `db_pull` command pulls a **remote** database into your **local** environment. The following process is observed:\n\n1. Takes a dump of the remote database\n2. Runs a search and replace on the dump file\n3. Backups up your local database\n4. Imports the remote dump into your local database\n\nThe `target` argument represents the remote target whose database you wish to pull into your local environment. Eg:\n\n````grunt db_pull --target=\"stage\"````\n\n\n### Usage\n\n#### Local Target (required)\nAs above, the Plugin task is opinionated. It *expects* that you are working locally and pushing/pulling from/to that location.\n\nAs a result, it is essential that you define a *single* target *without* an `ssh_host` parameter. This is typically named \"local\" for convenience.\n\n```js\n\"local\": {\n  \"title\": \"Local\",\n  \"database\": \"local_db_name\",\n  \"user\": \"local_db_username\",\n  \"pass\": \"local_db_password\",\n  \"host\": \"local_db_host\",\n  \"url\": \"local_db_url\"\n  // note that the `local` target does not have an \"ssh_host\"\n},\n```\n\nThe task will assume that this target is equivilant to your `local` environment. You can call it anything you wish but it ***must not*** have an `ssh_host` parameter.\n\n#### Other Environment Targets\nAll other targets *must* contain a valid `ssh_host` parameter.\n\n```js\n\"develop\": {\n  \"title\": \"Development\",\n  \"database\": \"development_db_name\",\n  \"user\": \"development_db_username\",\n  \"pass\": \"development_db_password\",\n  \"host\": \"development_db_host\",\n  \"url\": \"development_db_url\",\n  \"ssh_host\": \"ssh_user@ssh_host\"\n},\n\"stage\": {\n  \"title\": \"Stage\",\n  \"database\": \"stage_db_name\",\n  \"user\": \"stage_db_username\",\n  \"pass\": \"stage_db_password\",\n  \"host\": \"stage_db_host\",\n  \"url\": \"stage_db_url\",\n  \"ssh_host\": \"ssh_user@ssh_host\"\n},\n\"production\": {\n  \"title\": \"Production\",\n  \"database\": \"production_db_name\",\n  \"user\": \"production_db_username\",\n  \"pass\": \"production_db_password\",\n  \"host\": \"production_db_host\",\n  \"url\": \"production_db_url\",\n  \"ssh_host\": \"ssh_user@ssh_host\"\n}\n```\n\n#### Full Usage Example\n\nThe structure below represents an typical usage example for the task configuration. Obviously you should replace the placeholders with your own database/environment configurations.\n\n```js\ngrunt.initConfig({\n  deployments: {\n    options: {\n      // any should be defined options here\n    },\n    // \"Local\" target\n    \"local\": {\n      \"title\": \"Local\",\n      \"database\": \"local_db_name\",\n      \"user\": \"local_db_username\",\n      \"pass\": \"local_db_password\",\n      \"host\": \"local_db_host\",\n      \"url\": \"local_db_url\"\n      // note that the `local` target does not have an \"ssh_host\"\n    },\n    // \"Remote\" targets\n    \"develop\": {\n      \"title\": \"Development\",\n      \"database\": \"development_db_name\",\n      \"user\": \"development_db_username\",\n      \"pass\": \"development_db_password\",\n      \"host\": \"development_db_host\",\n      \"url\": \"development_db_url\",\n      \"ssh_host\": \"ssh_user@ssh_host\"\n    },\n    \"stage\": {\n      \"title\": \"Stage\",\n      \"database\": \"stage_db_name\",\n      \"user\": \"stage_db_username\",\n      \"pass\": \"stage_db_password\",\n      \"host\": \"stage_db_host\",\n      \"url\": \"stage_db_url\",\n      \"ssh_host\": \"ssh_user@ssh_host\"\n    },\n    \"production\": {\n      \"title\": \"Production\",\n      \"database\": \"production_db_name\",\n      \"user\": \"production_db_username\",\n      \"pass\": \"production_db_password\",\n      \"host\": \"production_db_host\",\n      \"url\": \"production_db_url\",\n      \"ssh_host\": \"ssh_user@ssh_host\"\n    }\n  },\n})\n```\n\n### Configuration\n\nEach target expects a series of configuration options to be provided to enable the task to function correctly. These are detailed below:\n\n#### title\nType: `String`\nDescription: A proper case name for the target. Used to describe the target to humans in console output whilst the task is running.\n\n#### database\nType: `String`\nDescription: the name of the database for this target.\n\n#### user\nType: `String`\nDescription: the database user with permissions to access and modify the database\n\n#### pass\nType: `String`\nDescription: the password for the database user (above)\n\n#### host\nType: `String`\nDescription: the hostname for the location in which the database resides. Typically this will be `localhost`\n\n#### url\nType: `String`\nDescription: the string to search and replace within the database before it is moved to the target location. Typically this is designed for use with systems such as WordPress where the `siteurl` value is [stored in the database](http://codex.wordpress.org/Changing_The_Site_URL) and is required to be updated upon migration to a new environment. It is however suitable for replacing any single value within the database before it is moved.\n\n#### ssh_host\nType: `String`\nDescription: ssh connection string in the format `SSH_USER@SSH_HOST`. The task assumes you have ssh keys setup which allow you to remote into your server without requiring the input of a password. As this is an exhaustive topic we will not cover it here but you might like to start by reading [Github's own advice](https://help.github.com/articles/generating-ssh-keys).\n\n### Options\n\n#### options.backups_dir\nType: `String`\nDefault value: `backups`\n\nA string value that represents the directory path (*relative* to your Grunt file) to which you want your database backups for source and target to be saved prior to modifications.\n\nYou may wish to have your backups reside outside the current working directory of your Gruntfile. In which case simply provide the relative path eg: ````../../backups````.\n\n#### options.target\n\nType: `String`\nDefault value: ``\n\nA string value that represents the default target for the tasks. You can easily override it using the `--target` option\n\n## Contributing\n\nContributions to this plugin are most welcome. This is very much a Alpha release and so if you find a problem please consider raising a pull request or creating a Issue which describes the problem you are having and proposes a solution.\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n\n* 2013-11-12   v0.2.0   Fix escaping issues, ability to define `target` via options, README doc fixes, pass host param to mysqldump.\n* 2013-06-11   v0.1.0   Minor updates to docs including addtion of Release History section.\n* 2013-06-11   v0.0.1   Initial Plugin release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetdave%2Fgrunt-deployments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetdave%2Fgrunt-deployments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetdave%2Fgrunt-deployments/lists"}