Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable -a rsync parameter when locally #175

Merged
merged 2 commits into from
Apr 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 24 additions & 17 deletions deb/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,17 @@ function skipIfAlreadyPublished(){
# Upload Debian Package
function uploadPackage(){
rsync \
-avz \
--verbose \
--recursive \
--compress \
--ignore-existing \
-O --no-o --no-g --no-perms \
--progress \
"$DEB" "$DEBDIR/"

rsync \
-avz \
--archive \
--verbose \
--compress \
--ignore-existing \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
Expand All @@ -113,41 +116,45 @@ function uploadPackageSite(){
"$D"/contents/binary

rsync \
-avz \
--verbose \
--recursive \
--compress \
--progress \
-O --no-o --no-g --no-perms \
"$D/contents/" "$DEB_WEBDIR/"

rsync \
-avz \
-e "ssh ${SSH_OPTS[*]}" \
--archive \
--compress \
--progress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
"$D/contents/" "$PKGSERVER:${DEB_WEBDIR// /\\ }/"
}

function uploadHtmlSite(){

# Html file need to be located in the binary directory
rsync \
-avz \
--compress \
--recursive \
--progress \
-O --no-o --no-g --no-perms \
--verbose \
"$D/html/" "$DEBDIR/"

rsync \
-avz \
-e "ssh ${SSH_OPTS[*]}" \
-O \
--no-o --no-g --no-perms \
--archive \
--compress \
--progress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
"$D/html/" "$PKGSERVER:${DEB_WEBDIR// /\\ }/"

rsync \
-rlpgoDvz \
-e "ssh ${SSH_OPTS[*]}" \
-O \
--no-o --no-g --no-perms \
--archive \
--compress \
--progress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
"$D/html/" "$PKGSERVER:${DEBDIR// /\\ }/"
}

Expand Down
31 changes: 20 additions & 11 deletions msi/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,29 +54,35 @@ function uploadPackage(){

# Local
rsync \
-avz \
--compress \
--verbose \
--recursive \
--ignore-existing \
--progress \
-O --no-o --no-g --no-perms \
"${MSI}" "${MSIDIR}/${VERSION}/"

rsync \
-avz \
--compress \
--ignore-existing \
-O --no-o --no-g --no-perms \
--recursive \
--progress \
--verbose \
"${MSI_SHASUM}" "${MSIDIR}/${VERSION}/"

# Remote
rsync \
-avz \
--archive \
--compress \
--verbose \
--ignore-existing \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
"${MSI}" "$PKGSERVER:${MSIDIR}/${VERSION}/"

rsync \
-avz \
--archive \
--compress \
--verbose \
--ignore-existing \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
Expand All @@ -86,17 +92,20 @@ function uploadPackage(){
# The site need to be located in the binary directory
function uploadSite(){
rsync \
-avz \
--compress \
--verbose \
--recursive \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
"${D}/" "$PKGSERVER:${MSIDIR// /\\ }/"
"${D}/" "${MSIDIR// /\\ }/"

rsync \
-avz \
--archive \
--compress \
--verbose \
--progress \
-O --no-o --no-g --no-perms \
-e "ssh ${SSH_OPTS[*]}" \
"${D}/" "${MSIDIR// /\\ }/"
"${D}/" "$PKGSERVER:${MSIDIR// /\\ }/"
}

function show(){
Expand Down
29 changes: 18 additions & 11 deletions rpm/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,18 @@ function init(){
function uploadPackage(){
# Local
rsync \
-avz \
--verbose \
--compress \
--ignore-existing \
-O --no-o --no-g --no-perms \
--recursive \
--progress \
"$RPM" "$RPMDIR/"

# Remote
rsync \
-avz \
--archive \
--verbose \
--compress \
-e "ssh ${SSH_OPTS[*]}" \
--ignore-existing \
--progress \
Expand All @@ -97,16 +100,19 @@ function show(){
function uploadSite(){
pushd "$D"
rsync \
-avz \
--compress \
--recursive \
--verbose \
--exclude RPMS \
--exclude "HEADER.html" \
--exclude "FOOTER.html" \
-O --no-o --no-g --no-perms \
--progress \
. "$RPM_WEBDIR/"

rsync \
-avz \
--archive \
--compress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
--exclude RPMS \
--exclude "HEADER.html" \
Expand All @@ -116,22 +122,23 @@ function uploadSite(){

# Following html need to be located inside the binary directory
rsync \
-avz \
--compress \
--verbose \
--recursive \
--include "HEADER.html" \
--include "FOOTER.html" \
-O --no-o --no-g --no-perms \
--exclude "*" \
--progress \
. "$RPMDIR/"

rsync \
-rlpgoDvz \
--archive \
--compress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
--include "HEADER.html" \
--include "FOOTER.html" \
--exclude "*" \
-O \
--no-o --no-g --no-perms \
--progress \
. "$PKGSERVER:${RPMDIR// /\\ }/"
popd
Expand Down
29 changes: 18 additions & 11 deletions suse/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,17 @@ function show(){

function uploadPackage(){
rsync \
-avz \
--recursive \
--verbose \
--compress \
--ignore-existing \
--progress \
-O --no-o --no-g --no-perms \
"$SUSE" "$SUSEDIR/" # Local

rsync \
-avz \
--archive \
--verbose \
--compress \
--ignore-existing \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
Expand All @@ -86,17 +89,20 @@ function uploadSite(){

pushd $D
rsync \
-avz \
--recursive \
--verbose \
--compress \
--progress \
--exclude RPMS \
--exclude "HEADER.html" \
--exclude "FOOTER.html" \
-O --no-o --no-g --no-perms \
. "$SUSE_WEBDIR/" #Local

# shellcheck disable=SC2029
rsync \
-avz \
--archive \
--verbose \
--compress \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
--exclude RPMS \
Expand Down Expand Up @@ -136,22 +142,23 @@ function uploadSite(){

# Following html need to be located inside the binary directory
rsync \
-avz \
--compress \
--verbose \
--recursive \
--include "HEADER.html" \
--include "FOOTER.html" \
--exclude "*" \
-O --no-o --no-g --no-perms \
--progress \
. "$SUSEDIR/"

rsync \
-rlpgoDvz \
--archive \
--compress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
--include "HEADER.html" \
--include "FOOTER.html" \
--exclude "*" \
-O \
--no-o --no-g --no-perms \
--progress \
. "$PKGSERVER:${SUSEDIR// /\\ }/"

Expand Down
31 changes: 20 additions & 11 deletions war/publish/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,35 @@ function uploadPackage(){

# Local
rsync \
-avz \
--compress \
--recursive \
--verbose \
--ignore-existing \
--progress \
-O --no-o --no-g --no-perms \
"${WAR}" "${WARDIR}/${VERSION}/${ARTIFACTNAME}.war"

rsync \
-avz \
--compress \
--recursive \
--verbose \
--ignore-existing \
--progress \
-O --no-o --no-g --no-perms \
"${WAR_SHASUM}" "${WARDIR}/${VERSION}/"

# Remote
rsync \
-avz \
--archive \
--compress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
--ignore-existing \
--progress \
"${WAR}" "$PKGSERVER:${WARDIR}/${VERSION}/${ARTIFACTNAME}.war"

rsync \
-avz \
--archive \
--compress \
--verbose \
-e "ssh ${SSH_OPTS[*]}" \
--ignore-existing \
--progress \
Expand All @@ -84,17 +90,20 @@ function uploadPackage(){
# Site html need to be located in the binary directory
function uploadSite(){
rsync \
-avz \
--compress \
--recursive \
--verbose \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
"${D}/" "$PKGSERVER:${WARDIR// /\\ }/"
"${D}/" "${WARDIR// /\\ }/"

rsync \
-avz \
--archive \
--compress \
--verbose \
--progress \
-e "ssh ${SSH_OPTS[*]}" \
-O --no-o --no-g --no-perms \
"${D}/" "${WARDIR// /\\ }/"
"${D}/" "$PKGSERVER:${WARDIR// /\\ }/"
}

function show(){
Expand Down