{"id":15042355,"url":"https://github.com/purpose-green/release","last_synced_at":"2025-10-12T21:22:19.778Z","repository":{"id":257647308,"uuid":"858763938","full_name":"Purpose-Green/release","owner":"Purpose-Green","description":"A script to make faster releases 🚀","archived":false,"fork":false,"pushed_at":"2025-08-26T10:27:17.000Z","size":6375,"stargazers_count":7,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-26T12:56:10.563Z","etag":null,"topics":["bash"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Purpose-Green.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-09-17T13:49:09.000Z","updated_at":"2025-08-26T10:27:03.000Z","dependencies_parsed_at":"2025-04-14T20:55:33.080Z","dependency_job_id":"afa58526-7b0e-4038-b5cd-b4dcfae1f1e1","html_url":"https://github.com/Purpose-Green/release","commit_stats":null,"previous_names":["purpose-green/deploy","purpose-green/release"],"tags_count":18,"template":false,"template_full_name":"Chemaclass/bash-skeleton","purl":"pkg:github/Purpose-Green/release","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Purpose-Green%2Frelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Purpose-Green%2Frelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Purpose-Green%2Frelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Purpose-Green%2Frelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Purpose-Green","download_url":"https://codeload.github.com/Purpose-Green/release/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Purpose-Green%2Frelease/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012997,"owners_count":26085222,"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-12T02:00:06.719Z","response_time":53,"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":["bash"],"created_at":"2024-09-24T20:47:09.718Z","updated_at":"2025-10-12T21:22:19.733Z","avatar_url":"https://github.com/Purpose-Green.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Release\n\nThis script automates creating a release using your local Git. It:\n\n- Selects the branch to release (e.g., `main`)\n- Fetches the latest changes\n- Compares commits with the target branch\n- Prompts for confirmation\n- Merges the branch\n- Tags and creates a release\n- Merges the branch back into the development branch\n- Share the changelog via Slack\n\n\u003e Run this script locally; deployment happens on the server after the release is created.\n\n## How to use it?\n\n```txt\n./release --help\nUsage: release [arguments] [options]\n\nArguments:\n  source-branch        The branch name to release.\n\nOptions:\n  -d, --dry-run         Simulate the release process without making any changes\n  -f, --force           Ignore that your current local branch has ahead commits\n  -e, --env             Load a custom env file overriding the .env environment variables\n  -h, --help            Print Help (this message) and exit\n  -v, --version         Print version information and exit\n  --source branch       Specify the source branch\n  --target branch       Specify the target branch (default: \"prod\")\n  --develop branch      Specify the develop branch (default: {source-branch})\n  --debug               Enable debug mode (set -x)\n\nExamples:\n  release main\n  release main --dry-run\n  release fix/... --force\n  release fix/... --dry-run --force\n```\n\n## Env variables\n\n\u003e Note: you can (optionally) use `RELEASE_` as prefix for all env keys.\n\u003e Useful if you want to distinguish visually the origin of that env key-value.\n\u003e Eg: Using `SOURCE_BRANCH` will be equivalent to `RELEASE_SOURCE_BRANCH`.\n\n### BRANCHES\n\n#### SOURCE_BRANCH\n\nThe default source branch that you want to use for your releases.\n\n\u003e Default: `main`\n\n#### TARGET_BRANCH\n\nThe default target branch that you want to use for your releases.\n\n\u003e Default: `prod`\n\n#### DEVELOPMENT_BRANCH\n\nIf you have a different develop branch from the source branch, you can also define it here.\n\n\u003e Default: `main`\n\n### SLACK\n\n#### SLACK_CHANNEL_ID\n\nThe Slack channel ID where to publish the changelog message.\n\n\u003e Example: SLACK_CHANNEL_ID=#your-channel\n\n#### SLACK_OAUTH_TOKEN\n\nThe Slack oauth token with the right of writing into your channel.\n\n\u003e Example: SLACK_CHANNEL_ID=xoxb-123-456-ABC789\n\n### EXTRA\n\n#### EXTRA_CONFIRMATION\n\nForce asking for a new dialog when a filepath is found on such a directly (the key).\nThe value is the question forced to be asked. It must be [y/Y] to continue the release.\n\n\u003e Example: EXTRA_CONFIRMATION='{\"migrations\": \"Migrations found! Remember to create a DB backup!\"}'\n\n#### EXTRA_RUN_COMMANDS\n\nRun a command when a filepath is found on such a directory (the key).\nThe commands will be executed only once, even if multiple files are affected.\nHow? After running a command, this will be saved on memory to avoid running the same command twice.\n\n\u003e Example: EXTRA_RUN_COMMANDS='{\"migrations\": \"api_call_to_create_DB_backup\"}'\n\n### SUCCESSFUL_TEXT\n\nDisplay a text at the very end of the release.\nUseful to have a link directly to the releases page to validate everything was good.\n\n\u003e Example: SUCCESSFUL_TEXT=https://github.com/Purpose-Green/release/releases\n\n## Demo\n\n### Using --dry-run\n\n![](demo/using-dry-run.gif)\n\n### Creating a new release\n\n![](demo/creating-release.gif)\n\n## Development\n\n#### Env\n\nMake sure you have .env ready to use.\n\n```bash\ncp .env.dist .env\ncp .env.tools.dist .env.tools\n```\n\n#### Source\n\n- The entry point of the script is `./release`\n- The source code is `src/`, split by different script files storing isolated functions.\n- You can build the entire project and create a single executable script with `./build.sh`\n- Make sure to install dependencies with `make install` or `./install-dependencies.sh`\n  - This will install libraries such as bashdep, bashunit, create-pr, dev/dumper\n\n#### Tests\n\nThe tests are inside `tests/`, using [bashunit](https://github.com/TypedDevs/bashunit/).\n\n\u003e Remember to install bashunit with `make install`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurpose-green%2Frelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurpose-green%2Frelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurpose-green%2Frelease/lists"}