Skip to content

Commit

Permalink
Remove build.sh script (#247)
Browse files Browse the repository at this point in the history
This was just calling another script, so rather redundant.

Rename `fetch_data.sh` -> `fetch_builtin_data.sh` as that better
describes what the script does.

Actually run the script to update the built-in data available in
Regal policy.

Signed-off-by: Anders Eknert <anders@styra.com>
  • Loading branch information
anderseknert authored Aug 10, 2023
1 parent 99205f8 commit 031d292
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
5 changes: 0 additions & 5 deletions build.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build/fetch_data.sh → build/fetch_builtin_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)

result=$(opa eval --format pretty --data "$SCRIPT_DIR/builtin_metadata.rego" 'data.build.metadata.builtin_metadata')

echo "${result}" > "$1"
echo "${result}" > "$SCRIPT_DIR/../bundle/regal/opa/builtins/data.json"
16 changes: 15 additions & 1 deletion bundle/regal/opa/builtins/data.json
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,20 @@
"type": "string"
}
},
"crypto.parse_private_keys": {
"args": [
{
"description": "PEM encoded data containing one or more private keys as concatenated blocks. Optionally Base64 encoded.",
"name": "keys",
"type": "string"
}
],
"result": {
"description": "parsed private keys represented as objects",
"name": "output",
"type": "array[object[string: any]]"
}
},
"crypto.sha1": {
"args": [
{
Expand Down Expand Up @@ -2609,7 +2623,7 @@
"time.format": {
"args": [
{
"description": "a number representing the nanoseconds since the epoch (UTC); or a two-element array of the nanoseconds, and a timezone string; or a three-element array of ns, timezone string and a layout string (see golang supported time formats)",
"description": "a number representing the nanoseconds since the epoch (UTC); or a two-element array of the nanoseconds, and a timezone string; or a three-element array of ns, timezone string and a layout string or golang defined formatting constant (see golang supported time formats)",
"name": "x",
"type": "any\u003cnumber, array\u003cnumber, string\u003e, array\u003cnumber, string, string\u003e\u003e"
}
Expand Down

0 comments on commit 031d292

Please sign in to comment.