diff --git a/.github/scripts/.build.zsh b/.github/scripts/.build.zsh index f579aca3f..707188423 100755 --- a/.github/scripts/.build.zsh +++ b/.github/scripts/.build.zsh @@ -40,16 +40,10 @@ build() { if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h} local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]} local project_root=${SCRIPT_HOME:A:h:h} - local buildspec_file=${project_root}/buildspec.json fpath=(${SCRIPT_HOME}/utils.zsh ${fpath}) autoload -Uz log_group log_error log_output check_${host_os} setup_ccache - if [[ ! -r ${buildspec_file} ]] { - log_error 'Missing buildspec.json in project checkout.' - return 2 - } - local -i debug=0 local target @@ -110,8 +104,7 @@ build() { autoload -Uz setup_ubuntu && setup_ubuntu } - local product_name - read -r product_name <<< "$(jq -r '.name' ${buildspec_file})" + local product_name='obs-studio' pushd ${project_root} diff --git a/.github/scripts/.package.zsh b/.github/scripts/.package.zsh index 22fd34ef8..821dc9f38 100755 --- a/.github/scripts/.package.zsh +++ b/.github/scripts/.package.zsh @@ -40,7 +40,6 @@ package() { if (( ! ${+SCRIPT_HOME} )) typeset -g SCRIPT_HOME=${ZSH_ARGZERO:A:h} local host_os=${${(s:-:)ZSH_ARGZERO:t:r}[2]} local project_root=${SCRIPT_HOME:A:h:h} - local buildspec_file=${project_root}/buildspec.json fpath=(${SCRIPT_HOME}/utils.zsh ${fpath}) autoload -Uz log_error log_output log_group check_${host_os} @@ -104,9 +103,7 @@ package() { check_${host_os} - local product_name - read -r product_name <<< \ - "$(jq -r '.name' ${buildspec_file})" + local product_name='obs-studio' local commit_version='0.0.0' local commit_distance='0' diff --git a/.github/scripts/utils.zsh/setup_ubuntu b/.github/scripts/utils.zsh/setup_ubuntu index ad1e85744..d877352c2 100644 --- a/.github/scripts/utils.zsh/setup_ubuntu +++ b/.github/scripts/utils.zsh/setup_ubuntu @@ -23,9 +23,13 @@ local deps_label local deps_hash IFS=';' read -r deps_version deps_baseurl deps_label deps_hash deps_revision <<< \ - "$(jq -r --arg target "${target}" \ - '.dependencies["cef"] | {version, baseUrl, "label", "hash": .hashes[$target], "revision": .revision[$target]} | join(";")' \ - ${buildspec_file})" + "$(jq -r --arg target "${target}" ' + .configurePresets[] + | select(.name=="dependencies") + | .vendor["obsproject.com/obs-studio"].dependencies["cef"] + | {version, baseUrl, "label", "hash": .hashes[$target], "revision": .revision[$target]} + | join(";") + ' ${project_root}/CMakePresets.json)" if (( ! deps_version )) { log_error 'No valid cef spec found in buildspec.json.'