Commit f75016e5 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

chore: use long CLI options

parent bee1cbc5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -63,7 +63,7 @@ function maybe_process_template() {
  then
    project_path_enc=${project_path//\//%2f}
    web_url=$(echo "$project_json" | jq -r .web_url)
    tags_array_json=$(echo "$all_tags" | jq --raw-input -c . | jq --slurp -c .)
    tags_array_json=$(echo "$all_tags" | jq --raw-input . | jq --slurp --compact-output .)
    add_info_json="{extension_id: $extension_json, project: {tag: \"$tag\", tags: $tags_array_json, name: \"$project_name\", path: \"$project_path\", web_url: \"$web_url\"}}"

    # get kicker.json file from latest tag
@@ -183,7 +183,7 @@ function build_aggregated_json() {
    if [[ -d "$tmpl_dir/variants" ]]
    then
      log_info " ... adding outer variants to \\e[33;1m${tmpl_file}\\e[0m"
      variants_array_json=$(jq -s '.' $tmpl_dir/variants/*.json)
      variants_array_json=$(jq --slurp '.' $tmpl_dir/variants/*.json)
      jq ".variants+=$variants_array_json" < "$tmpl_file" > "$tmpl_dir/template-final.json"
    else
      cp "$tmpl_file" "$tmpl_dir/template-final.json"
@@ -194,13 +194,13 @@ function build_aggregated_json() {
  if [[ -d "$tmp_dir/presets" ]]
  then
  log_info "--- Assembling presets..."
    presets_array_json=$(jq -s '.' $tmp_dir/presets/*.json)
    presets_array_json=$(jq --slurp '.' $tmp_dir/presets/*.json)
  else
    presets_array_json='[]'
  fi

  # 3: assemble
  jq -s -c '.' ${tmp_dir}/*/template-final.json | jq -c "{extensions: $extensions_array_json, presets: $presets_array_json, templates: .}" > "$JSON_OUT"
  jq --slurp '.' ${tmp_dir}/*/template-final.json | jq --compact-output "{extensions: $extensions_array_json, presets: $presets_array_json, templates: .}" > "$JSON_OUT"
}

function build_aggregated_toc() {
@@ -210,7 +210,7 @@ function build_aggregated_toc() {
    echo "- Templates Reference:"
    if [[ -f "$tmp_dir/toc/build" ]]; then
      echo "  - Build & Test:"
      sort --ignore-case "$tmp_dir/toc/build" | sed 's/^/    /'
      sort --ignore--compact-outputase "$tmp_dir/toc/build" | sed 's/^/    /'
    fi
    if [[ -f "$tmp_dir/toc/analyse" ]]; then
      echo "  - Code Analysis:"