Skip to content

Commit ba6caa9

Browse files
committed
Update no-nexus.sh to include descriptive comment
1 parent c8592b3 commit ba6caa9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.githooks/no-nexus.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
#! /usr/bin/env bash
22

3+
# This script ensures that the poetry.lock file does not contain references to the internal Indeed Nexus PyPI repository.
4+
# It is used as a git hook to automatically remove the [package.source] section for Nexus from poetry.lock.
5+
# This is necessary to ensure the lock file is portable and open-source friendly.
6+
# The script uses gsed to remove the Nexus source block and any resulting empty lines, then checks if any changes were made.
7+
# If Nexus references are found and removed, the script exits with 1 to prevent the commit, so we can stage the changes made by the script before committing again.
8+
39
gsed -i'' \
410
-e '/./{H;$!d}' \
511
-e 'x' \

0 commit comments

Comments
 (0)