diff --git a/assets/check b/assets/check index 6cf35810..4ec86f35 100755 --- a/assets/check +++ b/assets/check @@ -25,7 +25,6 @@ branch=$(jq -r '.source.branch // ""' < $payload) paths="$(jq -r '(.source.paths // ["."])[]' < $payload)" # those "'s are important ignore_paths="$(jq -r '":!" + (.source.ignore_paths // [])[]' < $payload)" # these ones too tag_filter=$(jq -r '.source.tag_filter // ""' < $payload) -fetch_tags=$(jq -r '.source.fetch_tags // ""' < $payload) git_config_payload=$(jq -r '.source.git_config // []' < $payload) ref=$(jq -r '.version.ref // ""' < $payload) skip_ci_disabled=$(jq -r '.source.disable_ci_skip // false' < $payload) @@ -38,10 +37,10 @@ configure_git_global "${git_config_payload}" destination=$TMPDIR/git-resource-repo-cache tagflag="" -if [ "$fetch_tags" == "false" ] ; then - tagflag="--no-tags" -elif [ -n "$tag_filter" ] || [ "$fetch_tags" == "true" ] ; then +if [ -n "$tag_filter" ] ; then tagflag="--tags" +else + tagflag="--no-tags" fi # We're just checking for commits; we don't ever need to fetch LFS files here! diff --git a/assets/in b/assets/in index d830306d..f27e8e17 100755 --- a/assets/in +++ b/assets/in @@ -45,15 +45,15 @@ submodule_remote=$(jq -r '(.params.submodule_remote // false)' < $payload) commit_verification_key_ids=$(jq -r '(.source.commit_verification_key_ids // [])[]' < $payload) commit_verification_keys=$(jq -r '(.source.commit_verification_keys // [])[]' < $payload) tag_filter=$(jq -r '.source.tag_filter // ""' < $payload) -fetch_tags=$(jq -r '.params.fetch_tags // ""' < $payload) +fetch_tags=$(jq -r '.params.fetch_tags' < $payload) gpg_keyserver=$(jq -r '.source.gpg_keyserver // "hkp://ipv4.pool.sks-keyservers.net/"' < $payload) disable_git_lfs=$(jq -r '(.params.disable_git_lfs // false)' < $payload) clean_tags=$(jq -r '(.params.clean_tags // false)' < $payload) short_ref_format=$(jq -r '(.params.short_ref_format // "%s")' < $payload) # If params not defined, get it from source -if [ -z "$fetch_tags" ] ; then - fetch_tags=$(jq -r '.source.fetch_tags // ""' < $payload) +if [ -z "$fetch_tags" ] || [ "$fetch_tags" == "null" ] ; then + fetch_tags=$(jq -r '.source.fetch_tags' < $payload) fi configure_git_global "${git_config_payload}"