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

refactor(github): replace pushd/popd with cd #2819

Merged
merged 1 commit into from
Dec 4, 2024
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
10 changes: 6 additions & 4 deletions .github/source_cardano_cli.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

pushd "$WORKDIR" || exit 1
_origpwd="$PWD"
cd "$WORKDIR" || exit 1

case "${CARDANO_CLI_REV:-""}" in
"" )
Expand All @@ -15,7 +16,7 @@ case "${CARDANO_CLI_REV:-""}" in
git clone --depth 1 https://github.com/IntersectMBO/cardano-cli.git
fi

pushd cardano-cli || exit 1
cd cardano-cli || exit 1
git fetch origin main
;;

Expand All @@ -24,7 +25,7 @@ case "${CARDANO_CLI_REV:-""}" in
git clone https://github.com/IntersectMBO/cardano-cli.git
fi

pushd cardano-cli || exit 1
cd cardano-cli || exit 1
git fetch
;;
esac
Expand All @@ -36,4 +37,5 @@ git rev-parse HEAD
nix build --accept-flake-config .#cardano-cli -o cardano-cli-build || exit 1
[ -e cardano-cli-build/bin/cardano-cli ] || exit 1

pushd "$REPODIR" || exit 1
cd "$_origpwd" || exit 1
unset _origpwd
12 changes: 8 additions & 4 deletions .github/source_dbsync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ TEST_THREADS="${TEST_THREADS:-15}"
CLUSTERS_COUNT="${CLUSTERS_COUNT:-4}"
export TEST_THREADS CLUSTERS_COUNT

pushd "$WORKDIR" || exit 1
_origpwd="$PWD"
cd "$WORKDIR" || exit 1

stop_postgres() {
echo "Stopping postgres"
Expand Down Expand Up @@ -57,7 +58,7 @@ case "${DBSYNC_REV:-""}" in
git clone --depth 1 https://github.com/IntersectMBO/cardano-db-sync.git
fi

pushd cardano-db-sync || exit 1
cd cardano-db-sync || exit 1
git fetch origin master
;;

Expand All @@ -66,7 +67,7 @@ case "${DBSYNC_REV:-""}" in
git clone https://github.com/IntersectMBO/cardano-db-sync.git
fi

pushd cardano-db-sync || exit 1
cd cardano-db-sync || exit 1
git fetch
;;
esac
Expand Down Expand Up @@ -112,7 +113,7 @@ fi
[ -e db-sync-node/bin/cardano-db-sync ] || exit 1
export DBSYNC_REPO="$PWD"

pushd "$REPODIR" || exit 1
cd "$REPODIR" || exit 1

# set postgres env variables
export PGHOST=localhost
Expand All @@ -121,3 +122,6 @@ export PGPORT=5432

# start and setup postgres
./scripts/postgres-start.sh "$WORKDIR/postgres" -k

cd "$_origpwd" || exit 1
unset _origpwd
10 changes: 6 additions & 4 deletions .github/source_plutus_apps.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

pushd "$WORKDIR" || exit 1
_origpwd="$PWD"
cd "$WORKDIR" || exit 1

case "${PLUTUS_APPS_REV:-""}" in
"" )
Expand All @@ -15,7 +16,7 @@ case "${PLUTUS_APPS_REV:-""}" in
git clone --depth 1 --recurse-submodules --shallow-submodules https://github.com/IntersectMBO/plutus-apps.git
fi

pushd plutus-apps || exit 1
cd plutus-apps || exit 1
git fetch origin main
;;

Expand All @@ -24,7 +25,7 @@ case "${PLUTUS_APPS_REV:-""}" in
git clone --recurse-submodules https://github.com/IntersectMBO/plutus-apps.git
fi

pushd plutus-apps || exit 1
cd plutus-apps || exit 1
git fetch
;;
esac
Expand All @@ -40,4 +41,5 @@ nix build --accept-flake-config .#create-script-context -o create-script-context
PATH="$(readlink -m create-script-context-build/bin)":"$PATH"
export PATH

pushd "$REPODIR" || exit 1
cd "$_origpwd" || exit 1
unset _origpwd
Loading