forked from ungleich-public/cdist
ensure cdist-type-emulator has __cdist_version set before and does not run git
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
1ee4647b28
commit
054cb7e611
3 changed files with 3 additions and 3 deletions
|
@ -45,7 +45,7 @@ scp -qr "${__cdist_src_base}"* \
|
||||||
|
|
||||||
# Adjust cdist-config to contain static version string
|
# Adjust cdist-config to contain static version string
|
||||||
tmp_version="$__cdist_version"
|
tmp_version="$__cdist_version"
|
||||||
sed "s/^\(__cdist_version=\).*/\1\"$tmp_version\"/" "$(which cdist-config)" | \
|
sed "s/^: \${\(__cdist_version\):=.*/\1=\"$tmp_version\"/" "$(which cdist-config)" | \
|
||||||
ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \
|
ssh -q "${__cdist_remote_user}@${__cdist_target_host}" \
|
||||||
"cat > \"${__cdist_my_remote_out_dir}\"/cdist-config"
|
"cat > \"${__cdist_my_remote_out_dir}\"/cdist-config"
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ __cdist_abs_mydir="$(cd "$__cdist_mydir" && pwd -P)"
|
||||||
__cdist_myname=${0##*/};
|
__cdist_myname=${0##*/};
|
||||||
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
__cdist_abs_myname="$__cdist_abs_mydir/$__cdist_myname"
|
||||||
|
|
||||||
__cdist_version="$(cd "$__cdist_abs_mydir/.." && git describe)"
|
: ${__cdist_version:="$(cd "$__cdist_abs_mydir/.." && git describe)"}
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Names / Constants
|
# Names / Constants
|
||||||
|
|
|
@ -34,7 +34,7 @@ __cdist_output_dir="$1"; shift
|
||||||
__cdist_work_dir="$__cdist_local_base_dir"
|
__cdist_work_dir="$__cdist_local_base_dir"
|
||||||
|
|
||||||
# Export information for cdist-type-emulator
|
# Export information for cdist-type-emulator
|
||||||
export __cdist_conf_dir __cdist_output_dir __cdist_manifest
|
export __cdist_conf_dir __cdist_output_dir __cdist_manifest __cdist_version
|
||||||
|
|
||||||
# Export information for manifests
|
# Export information for manifests
|
||||||
export __global="$__cdist_out_dir"
|
export __global="$__cdist_out_dir"
|
||||||
|
|
Loading…
Reference in a new issue