From: Matthias Kruk Date: Sat, 27 Nov 2021 17:03:54 +0000 (+0900) Subject: include/msg/dist: Remove context field X-Git-Url: https://git.corax.cc/?a=commitdiff_plain;h=a7d6e6d175d13ed53f8a7e73153545bdbf27be34;p=foundry include/msg/dist: Remove context field 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. --- diff --git a/include/msg/dist.sh b/include/msg/dist.sh index 5f881b3..5ffa17d 100644 --- a/include/msg/dist.sh +++ b/include/msg/dist.sh @@ -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" diff --git a/spec/dist.json b/spec/dist.json index 41ea791..a75c5b8 100644 --- a/spec/dist.json +++ b/spec/dist.json @@ -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",