Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hughjfchen committed May 15, 2022
1 parent cd6c5a9 commit ee8ebb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ set -u
# do we need to remove the nix stoer path? but there're unique, leave it for now.a
# ok, I want to do it
if [ -f "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME" ]; then
tar zPtvf "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME"|awk '{print $NF}'|grep '/nix/store/'|awk -F'/' '{print "/nix/store/" $4}'|sort|uniq|xargs sudo rm -fr
tar zPtvf "$SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME.tar.gz"|awk '{print $NF}'|grep '/nix/store/'|awk -F'/' '{print "/nix/store/" $4}'|sort|uniq|xargs sudo rm -fr
else
warn "cannot find the release tarball at $SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME, skip the undo phase."
warn "cannot find the release tarball at $SCRIPT_ABS_PATH/../../$RELEASE_TARBALL_NAME.tar.gz, skip the undo phase."
fi

done_banner "Top level" "project deploy - unpacking - undo"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ -f "$SCRIPT_ABS_PATH"/.I.am.here.to.indicate.this.is.the.building.machine ]
"$SCRIPT_ABS_PATH"/ci/fix-up/do.sh "$6" "$(basename "$0")"

else
if [ -n "$DEPLOY_UNDO" ]; then
if [ -n "${DEPLOY_UNDO+set}" ]; then
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_HAS_SYSTEMD_SERVICE="$(cat "$SCRIPT_ABS_PATH"/.release.has.systemd.service)" NIX_STORE_PATH="$(cat "$SCRIPT_ABS_PATH"/.build.output.nix.store.path)" "$SCRIPT_ABS_PATH"/cd/fix-up/undo.sh
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_USER_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.user.name)" RELEASE_TARBALL_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.tarball.name)" "$SCRIPT_ABS_PATH"/cd/unpack-tarball/undo.sh
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_DOCKER_ON_TARGET="" RELEASE_USER_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.user.name)" "$SCRIPT_ABS_PATH"/cd/prepare-env/undo.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [ -f "$SCRIPT_ABS_PATH"/.I.am.here.to.indicate.this.is.the.building.machine ]
"$SCRIPT_ABS_PATH"/ci/fix-up/do.sh "$4" "$(basename "$0")"

else
if [ -n "$DEPLOY_UNDO" ]; then
if [ -n "${DEPLOY_UNDO+set}" ]; then
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_HAS_SYSTEMD_SERVICE="$(cat "$SCRIPT_ABS_PATH"/.release.has.systemd.service)" NIX_STORE_PATH="$(cat "$SCRIPT_ABS_PATH"/.build.output.nix.store.path)" "$SCRIPT_ABS_PATH"/cd/fix-up/undo.sh
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_USER_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.user.name)" RELEASE_TARBALL_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.tarball.name)" "$SCRIPT_ABS_PATH"/cd/unpack-tarball/undo.sh
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_DOCKER_ON_TARGET="" RELEASE_USER_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.user.name)" "$SCRIPT_ABS_PATH"/cd/prepare-env/undo.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ if [ -f "$SCRIPT_ABS_PATH"/.I.am.here.to.indicate.this.is.the.building.machine ]
"$SCRIPT_ABS_PATH"/ci/fix-up/do.sh "$4" "$(basename "$0")"

else
if [ -n "$DEPLOY_UNDO" ]; then
if [ -n "${DEPLOY_UNDO+set}" ]; then
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_HAS_SYSTEMD_SERVICE="$(cat "$SCRIPT_ABS_PATH"/.release.has.systemd.service)" NIX_STORE_PATH="$(cat "$SCRIPT_ABS_PATH"/.build.output.nix.store.path)" "$SCRIPT_ABS_PATH"/cd/fix-up/undo.sh
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_USER_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.user.name)" RELEASE_TARBALL_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.tarball.name)" "$SCRIPT_ABS_PATH"/cd/unpack-tarball/undo.sh
BUILT_ATTRIBUTE_NAME=$(cat "$SCRIPT_ABS_PATH"/.built.attribute.name) RELEASE_DOCKER_ON_TARGET="" RELEASE_USER_NAME="$(cat "$SCRIPT_ABS_PATH"/.release.user.name)" "$SCRIPT_ABS_PATH"/cd/prepare-env/undo.sh
Expand Down

0 comments on commit ee8ebb6

Please sign in to comment.