From 1cad6a56de47ffdbf0bdd23672ecb31ea4a7f606 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Tue, 10 Sep 2024 06:20:03 +0000 Subject: [PATCH] Link to bento from README (#4) * Link to bento * Use ?? over typeof * Update format action * Format code * Update CHANGELOG --- .github/workflows/format.yml | 16 +++++++++------- CHANGELOG.md | 6 ++++++ README.md | 6 ++++-- lib/config.js | 7 +++---- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 7f80e54..abb62b8 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,24 +1,25 @@ --- -name: format +name: Format on: push: branches-ignore: - - master + - main workflow_dispatch: {} jobs: - fix: + commit: + name: Format code runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} token: ${{ secrets.GH_TOKEN }} - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v5 + uses: crazy-max/ghaction-import-gpg@v6 with: git_user_signingkey: true git_commit_gpgsign: true @@ -31,9 +32,10 @@ jobs: - name: Format run: npm run format - name: Commit - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 + if: always() with: - commit_message: Run format + commit_message: Format code commit_user_name: ${{ secrets.GIT_USER_NAME }} commit_user_email: ${{ secrets.GIT_USER_EMAIL }} commit_author: ${{ secrets.GIT_USER_NAME }} <${{ secrets.GIT_USER_EMAIL }}> diff --git a/CHANGELOG.md b/CHANGELOG.md index 32cf514..dc118a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/). +## 1.3.0 / 2024-09-09 + +### Added + +- New config option `checksumPrefix` to support compatible distributions like Bento. + ## 1.2.4 / 2022-11-28 - No changes. diff --git a/README.md b/README.md index 81c823c..ebde422 100644 --- a/README.md +++ b/README.md @@ -148,13 +148,13 @@ you can use the `include` property, #### Bento support -If you need Serverless Bento, you can change `src` and `checksumPrefix` properties: +If you need Serverless [Bento], set the `src` and `checksumPrefix` properties, ```json { "blobpack": { "name": "benthos-lambda", - "version": "4.10.0", + "version": "1.2.0", "platform": "linux_amd64", "checksumPrefix": "bento", "src": "https://github.com/warpstreamlabs/bento/releases/download" @@ -162,6 +162,8 @@ If you need Serverless Bento, you can change `src` and `checksumPrefix` properti } ``` +[Bento]: https://warpstreamlabs.github.io/bento/ + ### CLI ``` diff --git a/lib/config.js b/lib/config.js index 0c9b5a6..901b81f 100644 --- a/lib/config.js +++ b/lib/config.js @@ -10,11 +10,10 @@ export const loadConfig = async (configPath) => { ) } - if (typeof config.checksumPrefix === 'undefined') { - config.checksumPrefix = 'benthos' + return { + ...config, + checksumPrefix: config.checksumPrefix ?? 'benthos' } - - return config } export const loadJson = async (name) => {