From 7968a51dd088f7ecc0831a57a0ec593ffb825571 Mon Sep 17 00:00:00 2001 From: Maxim Samsonov Date: Mon, 17 Apr 2023 10:15:43 +0300 Subject: [PATCH] rnp references updated to 0.16.3 (#35) --- .github/workflows/tests.yml | 7 ++++++- .rubocop.yml | 4 ---- Formula/rnp.rb | 40 +++++++++++++++++-------------------- 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b1bca26..72f06ca 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -4,6 +4,11 @@ on: branches: - main pull_request: + +concurrency: + group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}' + cancel-in-progress: true + jobs: test-bot: strategy: @@ -18,7 +23,7 @@ jobs: - name: Cache Homebrew Bundler RubyGems id: cache - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ${{ steps.set-up-homebrew.outputs.gems-path }} key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} diff --git a/.rubocop.yml b/.rubocop.yml index 4c5ab25..5eba392 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -2,13 +2,9 @@ inherit_from: - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml -# local repo-specific modifications -# ... - Layout/SpaceAroundOperators: Exclude: - Formula/rnp.rb Layout/LineLength: Max: 120 - diff --git a/Formula/rnp.rb b/Formula/rnp.rb index 716ae6d..e9412e0 100644 --- a/Formula/rnp.rb +++ b/Formula/rnp.rb @@ -3,38 +3,34 @@ class Rnp < Formula desc "High-performance OpenPGP command-line tools and library" homepage "https://github.com/rnpgp/rnp" - url "https://github.com/rnpgp/rnp/archive/refs/tags/v0.15.2.tar.gz" - sha256 "198f239808093312d61a54fcdde94aa147260867bde9ee521a31185bab34747e" + url "https://github.com/rnpgp/rnp/archive/refs/tags/v0.16.3.tar.gz" + sha256 "5c4951e46cc29524a9eae90378414f88e6e0b54b59a1f44c75101b9022835e96" + license all_of: ["MIT", "BSD-2-Clause", "BSD-3-Clause"] head "https://github.com/rnpgp/rnp.git" - bottle do - root_url "https://github.com/rnpgp/homebrew-rnp/releases/download/rnp-0.15.2" - sha256 cellar: :any, catalina: "13cfb1132fe0c330e2ed2c5d613d27724768d81b68cc6470e65d71babb412278" - end - depends_on "cmake" => :build depends_on "botan" depends_on "json-c" def install - mkdir "build" do - system( - "cmake", - "..", - *std_cmake_args, - ) - system "make", "install" - end + system "cmake", "-S", ".", "-B", "build", + "-DBUILD_TESTING=OFF", *std_cmake_args + system "cmake", "--build", "build" + system "cmake", "--install", "build" end test do - testin = testpath/"message.txt" + testin = testpath / "message.txt" testin.write "hello" - encrypted = testpath/"enc.rnp" - decrypted = testpath/"dec.rnp" - shell_output("rnpkeys --generate-key --password=PASSWORD") - shell_output("rnp -c --password DUMMY --output #{encrypted} #{testin}") - shell_output("rnp --decrypt --password DUMMY --output #{decrypted} #{encrypted}") - cmp testin, decrypted + encr = "#{testpath}/enc.rnp" + decr = "#{testpath}/dec.rnp" + shell_output("#{bin}/rnpkeys --generate-key --password=PASSWORD") + shell_output( + "#{bin}/rnp -c --password DUMMY --output #{encr} #{testin}", + ) + shell_output( + "#{bin}/rnp --decrypt --password DUMMY --output #{decr} #{encr}", + ) + cmp testin, decr end end