### Install changelogger from Source Source: https://github.com/drgarcia1986/changelogger/blob/main/README.md Use 'go get' to install changelogger directly from its source repository. ```bash go get github.com/drgarcia1986/changelogger ``` -------------------------------- ### Example Changelog Directory Structure Source: https://context7.com/drgarcia1986/changelogger/llms.txt Illustrates the expected directory structure and file naming conventions for changelog entries. ```bash # Example directory structure .changelog/ ├── new-api.added # "New REST API for user management" ├── auth-feature.added # "Two-factor authentication support" ├── config-format.changed # "Configuration file format changed to YAML" ├── legacy-code.removed # "Removed Python 2.7 compatibility layer" └── null-pointer.fixed # "Fixed null pointer exception in parser" ``` -------------------------------- ### Changelog File Placeholder Replacement Example Source: https://github.com/drgarcia1986/changelogger/blob/main/README.md Illustrates how changelogger replaces the '[changelogger-notes]::' placeholder in a changelog file with new version entries. ```diff # Changelog - [changelogger-notes]:: + [changelogger-notes]:: + + ## v0.0.1 (2021-05-22) + ### Added + * A new cool feature + + ## Removed + * The deprecated feature ``` -------------------------------- ### Display Changelogger Help Source: https://context7.com/drgarcia1986/changelogger/llms.txt Display help and available options for the changelogger CLI. ```bash changelogger -h # Usage of changelogger: # -dir string # Directory of changelog entries # -path string # Path of the changelog file # -version string # The release version ``` -------------------------------- ### Display changelogger Help Information Source: https://github.com/drgarcia1986/changelogger/blob/main/README.md Run changelogger with the -h flag to view its usage instructions and available options. ```bash changelogger -h ``` -------------------------------- ### Create Changelog Entry Files Source: https://context7.com/drgarcia1986/changelogger/llms.txt Create individual changelog entry files with specific extensions (.added, .fixed, .removed, .changed) in the designated directory. ```bash # Create the changelog entries directory mkdir -p .changelog # Add a new feature entry echo "User authentication with OAuth2 support" > .changelog/oauth-feature.added # Add a bug fix entry echo "Fixed memory leak in connection pool" > .changelog/connection-fix.fixed # Add a deprecation/removal entry echo "Removed deprecated API v1 endpoints" > .changelog/api-v1.removed # Add a change entry echo "Updated database driver to version 2.0" > .changelog/db-driver.changed ``` -------------------------------- ### Create Changelog Entry Interactively Source: https://context7.com/drgarcia1986/changelogger/llms.txt Interactively prompts the user for an entry name, type (added/changed/removed/fixed), and description to create a new changelog entry file in the specified directory. ```makefile .PHONY: changelog-entry changelog-entry: @read -p "Entry name (e.g., my-feature): " name; \ read -p "Type (added/changed/removed/fixed): " type; \ read -p "Description: " desc; \ echo "$$desc" > $(CHANGELOG_DIR)/$$name.$$type @echo "Created $(CHANGELOG_DIR)/$$name.$$type" ``` -------------------------------- ### Generate Changelog with Specific Options Source: https://github.com/drgarcia1986/changelogger/blob/main/README.md Execute changelogger specifying the directory for entries, the path to the changelog file, and the release version. ```bash changelogger -dir ./.changelog -path ./CHANGELOG.md -version v1.1.2 ``` -------------------------------- ### GitHub Actions Workflow for Release Source: https://context7.com/drgarcia1986/changelogger/llms.txt Automate changelog generation and commit during the release process using GitHub Actions. ```yaml # .github/workflows/release.yml name: Release on: push: tags: - 'v*' jobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v4 with: go-version: '1.21' - name: Install changelogger run: go install github.com/drgarcia1986/changelogger@latest - name: Generate changelog run: | VERSION=${GITHUB_REF#refs/tags/} changelogger -dir ./.changelog -path ./CHANGELOG.md -version $VERSION - name: Commit changelog run: | git config user.name "GitHub Actions" git config user.email "actions@github.com" git add CHANGELOG.md git commit -m "Update CHANGELOG for ${{ github.ref_name }}" git push origin HEAD:main ``` -------------------------------- ### Generate Changelog with Version Source: https://context7.com/drgarcia1986/changelogger/llms.txt Generates the CHANGELOG.md file for a specific version. Requires the VERSION variable to be set to a value other than the default 'v0.0.0'. ```makefile VERSION ?= v0.0.0 CHANGELOG_DIR := .changelog CHANGELOG_FILE := CHANGELOG.md .PHONY: changelog changelog: @if [ "$(VERSION)" = "v0.0.0" ]; then \ echo "Usage: make changelog VERSION=v1.2.3"; \ exit 1; \ fi changelogger -dir $(CHANGELOG_DIR) -path $(CHANGELOG_FILE) -version $(VERSION) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.