Compare commits
2 Commits
v1.7.7.fx1
...
v1.7.9
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a3215524e | |||
| 84a8c1cb31 |
+44
-8
@@ -6,6 +6,7 @@ declare -A git_repo_arr
|
|||||||
git_repo_arr[cvttpy]=git@cloud21.cvtt.vpn:/opt/store/git/cvttpy.git
|
git_repo_arr[cvttpy]=git@cloud21.cvtt.vpn:/opt/store/git/cvttpy.git
|
||||||
git_repo_arr[ops]=git@cloud21.cvtt.vpn:/opt/store/git/ops.git
|
git_repo_arr[ops]=git@cloud21.cvtt.vpn:/opt/store/git/ops.git
|
||||||
git_repo_arr[research]=git@cloud21.cvtt.vpn:/opt/store/git/research.git
|
git_repo_arr[research]=git@cloud21.cvtt.vpn:/opt/store/git/research.git
|
||||||
|
git_repo_arr[cvtt-rust]=git@cloud21.cvtt.vpn:/opt/store/git/cvtt2/cvtt-rust.git
|
||||||
|
|
||||||
dist_root=/home/cvttdist/software/cvtt2
|
dist_root=/home/cvttdist/software/cvtt2
|
||||||
dist_user=cvttdist
|
dist_user=cvttdist
|
||||||
@@ -48,13 +49,29 @@ while getopts ":p:b:i" opt; do
|
|||||||
done
|
done
|
||||||
# ---------------- cmdline
|
# ---------------- cmdline
|
||||||
|
|
||||||
function confirm {
|
confirm() {
|
||||||
if [ "${interactive}" == "Y" ]; then
|
if [ "${interactive}" == "Y" ]; then
|
||||||
echo "--------------------------------"
|
echo "--------------------------------"
|
||||||
echo -n "Press <Enter> to continue" && read
|
echo -n "Press <Enter> to continue" && read
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rust_binaries() {
|
||||||
|
res=()
|
||||||
|
for binname in $(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].targets[] | select(.kind | index("bin")) | .name'); do
|
||||||
|
res+=("${binname}")
|
||||||
|
done
|
||||||
|
echo "${res[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
rust_libraries() {
|
||||||
|
res=()
|
||||||
|
for libname in $(cargo metadata --no-deps --format-version 1 | jq -r '.packages[].targets[] | select(.kind | index("lib")) | .name'); do
|
||||||
|
res+=("lib${libname}.rlib")
|
||||||
|
done
|
||||||
|
echo "${res[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
if [ "${interactive}" == "Y" ]; then
|
if [ "${interactive}" == "Y" ]; then
|
||||||
echo -n "Enter project [${prj}]: "
|
echo -n "Enter project [${prj}]: "
|
||||||
read project
|
read project
|
||||||
@@ -149,6 +166,29 @@ cmd_arr+=("${Cmd}")
|
|||||||
Cmd="rm -rf .git"
|
Cmd="rm -rf .git"
|
||||||
cmd_arr+=("${Cmd}")
|
cmd_arr+=("${Cmd}")
|
||||||
|
|
||||||
|
SourceLoc=../${project}
|
||||||
|
if [ "${project}" == "cvtt-rust" ]; then
|
||||||
|
|
||||||
|
Cmd="cd ${dist_root}/${project}/"
|
||||||
|
cmd_arr+=("${Cmd}")
|
||||||
|
# cmd_arr+=("cargo build")
|
||||||
|
cmd_arr+=("cargo build --release")
|
||||||
|
cmd_arr+=("mkdir -p ./dist/release")
|
||||||
|
pushd ${dist_root}/${project}/
|
||||||
|
rust_bins=$(rust_binaries)
|
||||||
|
rust_libs=$(rust_libraries)
|
||||||
|
popd
|
||||||
|
for bin in ${rust_bins[@]}; do
|
||||||
|
cmd_arr+=("cp target/release/${bin} ./dist/release")
|
||||||
|
done
|
||||||
|
for lb in ${rust_libs[@]}; do
|
||||||
|
cmd_arr+=("cp target/release/${lb} ./dist/release")
|
||||||
|
done
|
||||||
|
cmd_arr+=("cp release_version.txt ./dist/release")
|
||||||
|
|
||||||
|
SourceLoc=../${project}/dist/release
|
||||||
|
fi
|
||||||
|
|
||||||
dist_path="${dist_root}/${project}/${release_version}"
|
dist_path="${dist_root}/${project}/${release_version}"
|
||||||
|
|
||||||
for dist_loc in ${dist_locations}; do
|
for dist_loc in ${dist_locations}; do
|
||||||
@@ -156,9 +196,9 @@ for dist_loc in ${dist_locations}; do
|
|||||||
dist_host=${dhp[0]}
|
dist_host=${dhp[0]}
|
||||||
dist_port=${dhp[1]}
|
dist_port=${dhp[1]}
|
||||||
Cmd="rsync -avzh"
|
Cmd="rsync -avzh"
|
||||||
Cmd="${Cmd} --rsync-path=\"mkdir -p ${dist_path} && rsync\""
|
Cmd="${Cmd} --rsync-path=\"mkdir -p ${dist_path}"
|
||||||
Cmd="${Cmd} -e \"ssh -p ${dist_ssh_port}\""
|
Cmd="${Cmd} && rsync\" -e \"ssh -p ${dist_ssh_port}\""
|
||||||
Cmd="${Cmd} ../${project} ${dist_user}@${dist_host}:${dist_path}/"
|
Cmd="${Cmd} $SourceLoc ${dist_user}@${dist_host}:${dist_path}/"
|
||||||
cmd_arr+=("${Cmd}")
|
cmd_arr+=("${Cmd}")
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -179,8 +219,4 @@ do
|
|||||||
pwd && echo ${cmd} && eval ${cmd}
|
pwd && echo ${cmd} && eval ${cmd}
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "PROJECT ${project} **** P U L L N E W T A G S F R O M o r i g i n ****"
|
|
||||||
echo "----"
|
|
||||||
echo "(cd ${project}; git pull --tags; git pushall)"
|
|
||||||
echo "----"
|
|
||||||
echo "$0 Done ${project} ${release_version}"
|
echo "$0 Done ${project} ${release_version}"
|
||||||
|
|||||||
+1
-1
@@ -1 +1 @@
|
|||||||
1.7.7.fx1,services avalability check
|
1.7.9,build for cvtt-rust
|
||||||
|
|||||||
@@ -55,11 +55,9 @@ done
|
|||||||
for Host in ${Hosts[@]} ; do
|
for Host in ${Hosts[@]} ; do
|
||||||
host=$(echo $Host | cut -d'.' -f1)
|
host=$(echo $Host | cut -d'.' -f1)
|
||||||
Domain=$(echo $Host | cut -d'.' -f2-)
|
Domain=$(echo $Host | cut -d'.' -f2-)
|
||||||
# echo "Host=$Host host=$host Domain=$Domain"
|
|
||||||
|
|
||||||
# Get SSH port for the host, or use default if not specified
|
|
||||||
ToCheck=$(echo "$HOSTS_CONFIG" | jq -r --arg domain "$Domain" --arg host "$host" '.[$domain][$host].to_check // "Yes"')
|
ToCheck=$(echo "$HOSTS_CONFIG" | jq -r --arg domain "$Domain" --arg host "$host" '.[$domain][$host].to_check // "Yes"')
|
||||||
if [ "${ToCheck}" == "No" ]; then
|
if [ "${ToCheck^^}" == "NO" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
PortSSH=$(echo "$HOSTS_CONFIG" | jq -r --arg domain "$Domain" --arg host "$host" '.[$domain][$host].ssh_port // '"$DEFAULT_SSH_PORT"'')
|
PortSSH=$(echo "$HOSTS_CONFIG" | jq -r --arg domain "$Domain" --arg host "$host" '.[$domain][$host].ssh_port // '"$DEFAULT_SSH_PORT"'')
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ mapfile -t SvcNames < <(echo ${SERVICES_CONFIG} | jq -r '. | keys[]')
|
|||||||
DEFAULT_TO_CHECK=Yes
|
DEFAULT_TO_CHECK=Yes
|
||||||
for SvcName in "${SvcNames[@]}" ; do
|
for SvcName in "${SvcNames[@]}" ; do
|
||||||
ToCheck=$(echo "$SERVICES_CONFIG" | jq -r --arg svcname "$SvcName" '.[$svcname].to_check // "Yes"')
|
ToCheck=$(echo "$SERVICES_CONFIG" | jq -r --arg svcname "$SvcName" '.[$svcname].to_check // "Yes"')
|
||||||
if [ "${ToCheck}" == "No" ]; then
|
if [ "${ToCheck^^}" == "NO" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
Host=$(echo "$SERVICES_CONFIG" | jq -r --arg svcname "$SvcName" '.[$svcname].host ')
|
Host=$(echo "$SERVICES_CONFIG" | jq -r --arg svcname "$SvcName" '.[$svcname].host ')
|
||||||
|
|||||||
Reference in New Issue
Block a user