packages feed

include-env 0.1.0.0 → 0.1.1.0

raw patch · 3 files changed

+10/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -1,5 +1,9 @@ # include-env -[![Build Status](https://travis-ci.org/unfoldml/include-env.png)](https://travis-ci.org/unfoldml/include-env)+Embed secrets (e.g. API keys) from environment variables inside production artifacts without checking them into the repository.  -TODO Description.+This use case is relevant e.g. in continuous integration (CI) settings.++# Example ++In GitHub each private repository can have a number of secrets, which can be conveniently changed without being exposed as needed; GitHub Actions can pass repository secrets in as environment variables during any step, which is where this library comes in handy.
include-env.cabal view
@@ -1,12 +1,12 @@ name:                include-env-version:             0.1.0.0+version:             0.1.1.0 synopsis:            Include the value of an environment variable at compile time description:         Embed secrets (e.g. API keys) inside production artifacts without checking them into the repository. homepage:            https://github.com/unfoldml/include-env license:             BSD3 license-file:        LICENSE author:              Marco Zocca-maintainer:          example@example.com+maintainer:          oss@unfoldml.com copyright:           (c) 2021 Marco Zocca, UnfoldML AB category:            Development build-type:          Simple
src/IncludeEnv/TH.hs view
@@ -30,7 +30,8 @@     Nothing -> error $ unwords ["Cannot find variable", e, "in the environment."]     where       decl :: String -> String -> Q [Dec]-      decl n x = fmap (:[]) $ pure $ ValD qpat qbody [] where+      decl n x = pure [dq] where+        dq = ValD qpat qbody []         qpat = VarP (mkName n)         qbody = NormalB (LitE (StringL x))