Skip to content

Commit

Permalink
rnp references updated to 0.16.3 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxirmx authored Apr 17, 2023
1 parent 9315c9b commit 7968a51
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
Expand Down
4 changes: 0 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

40 changes: 18 additions & 22 deletions Formula/rnp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7968a51

Please sign in to comment.