]> git.corax.cc Git - foundry/commitdiff
include/msg/dist: Remove context field
authorMatthias Kruk <m@m10k.eu>
Sat, 27 Nov 2021 17:03:54 +0000 (02:03 +0900)
committerMatthias Kruk <m@m10k.eu>
Sat, 27 Nov 2021 17:03:54 +0000 (02:03 +0900)
Dist messages carry a field for a context identifier. However, since
dist messages do not reference files associated with a context, the
context field is not necessary.
This commit removes the context field from dist type messages.

include/msg/dist.sh
spec/dist.json

index 5f881b38679bac25e14db71c4b42c70b03b7bd04..5ffa17d411a89c07876fad213870cb30276b06c0 100644 (file)
@@ -11,12 +11,11 @@ __init() {
 }
 
 foundry_msg_dist_new() {
-       local context="$1"
-       local repository="$2"
-       local branch="$3"
-       local ref="$4"
-       local distribution="$5"
-       local artifacts=("${@:6}")
+       local repository="$1"
+       local branch="$2"
+       local ref="$3"
+       local distribution="$4"
+       local artifacts=("${@:5}")
 
        local artifacts_json
        local json
@@ -26,8 +25,7 @@ foundry_msg_dist_new() {
                return 1
        fi
 
-       if ! json=$(json_object "context"      "$context"      \
-                               "repository"   "$repository"   \
+       if ! json=$(json_object "repository"   "$repository"   \
                                "branch"       "$branch"       \
                                "ref"          "$ref"          \
                                "distribution" "$distribution" \
@@ -43,19 +41,6 @@ foundry_msg_dist_new() {
        return 0
 }
 
-foundry_msg_dist_get_context() {
-       local msg="$1"
-
-       local context
-
-       if ! context=$(foundry_msg_get_data_field "$msg" "context"); then
-               return 1
-       fi
-
-       echo "$context"
-       return 0
-}
-
 foundry_msg_dist_get_repository() {
        local msg="$1"
 
index 41ea7913486d9b6916921b18493e01d67cd3c416..a75c5b8bd1e38047ef20a084efb3f06cc7080984 100644 (file)
@@ -5,11 +5,6 @@
     "type":    "object",
 
     "properties": {
-       "context": {
-           "description": "Context identifier of this transaction",
-           "type": "string"
-       },
-
        "repository": {
             "description": "The URL of the repository that the artifacts were built from",
             "type": "string",
@@ -43,7 +38,6 @@
     },
 
     "required": [
-       "context",
        "repository",
        "branch",
        "ref",