Skip to content

Commit 39685ab

Browse files
committed
use subshell
1 parent f604c83 commit 39685ab

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

mkdocs/docs/how-to-release.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,19 @@ Navigate to the artifact directory. Generate signature and checksum files:
158158
* `.sha512` files: SHA-512 checksums for verifying file integrity.
159159

160160
```bash
161-
cd svn-release-candidate-${VERSION}rc${RC}
162-
163-
for name in $(ls pyiceberg-*.whl pyiceberg-*.tar.gz)
164-
do
165-
gpg --yes --armor --output "${name}.asc" --detach-sig "${name}"
166-
shasum -a 512 "${name}" > "${name}.sha512"
167-
done
161+
(
162+
cd svn-release-candidate-${VERSION}rc${RC}
163+
164+
for name in $(ls pyiceberg-*.whl pyiceberg-*.tar.gz)
165+
do
166+
gpg --yes --armor --output "${name}.asc" --detach-sig "${name}"
167+
shasum -a 512 "${name}" > "${name}.sha512"
168+
done
169+
)
168170
```
169171

172+
The parentheses `()` create a subshell. Any changes to the directory (`cd`) are limited to this subshell, so the current directory in the parent shell remains unchanged.
173+
170174
##### Upload Artifacts to Apache Dev SVN
171175

172176
Now, upload the files from the same directory:
@@ -177,7 +181,7 @@ svn checkout https://dist.apache.org/repos/dist/dev/iceberg $SVN_TMP_DIR
177181

178182
export SVN_TMP_DIR_VERSIONED=${SVN_TMP_DIR}pyiceberg-$VERSION_WITH_RC/
179183
mkdir -p $SVN_TMP_DIR_VERSIONED
180-
cp * $SVN_TMP_DIR_VERSIONED
184+
cp svn-release-candidate-${VERSION}rc${RC}/* $SVN_TMP_DIR_VERSIONED
181185
svn add $SVN_TMP_DIR_VERSIONED
182186
svn ci -m "PyIceberg ${VERSION_WITH_RC}" ${SVN_TMP_DIR_VERSIONED}
183187
```

0 commit comments

Comments
 (0)