mirror of
https://github.com/junjiem/dify-plugin-repackaging.git
synced 2025-12-08 16:22:28 +08:00
fix: Try .difyignore first, fallback to .gitignore if not found
This commit is contained in:
@ -122,13 +122,16 @@ repackage(){
|
|||||||
' requirements.txt
|
' requirements.txt
|
||||||
rm -f requirements.txt.bak
|
rm -f requirements.txt.bak
|
||||||
fi
|
fi
|
||||||
|
IGNORE_PATH=.difyignore
|
||||||
if [ -f .difyignore ]; then
|
if [ ! -f "$IGNORE_PATH" ]; then
|
||||||
if [[ "linux" == "$OS_TYPE" ]]; then
|
IGNORE_PATH=.gitignore
|
||||||
sed -i '/^wheels\//d' .difyignore
|
fi
|
||||||
|
if [ -f "$IGNORE_PATH" ]; then
|
||||||
|
if [[ "linux" == "$OS_TYPE" ]]; then
|
||||||
|
sed -i '/^wheels\//d' "${IGNORE_PATH}"
|
||||||
elif [[ "darwin" == "$OS_TYPE" ]]; then
|
elif [[ "darwin" == "$OS_TYPE" ]]; then
|
||||||
sed -i ".bak" '/^wheels\//d' .difyignore
|
sed -i ".bak" '/^wheels\//d' "${IGNORE_PATH}"
|
||||||
rm -f .difyignore.bak
|
rm -f "${IGNORE_PATH}.bak"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
cd ${CURR_DIR}
|
cd ${CURR_DIR}
|
||||||
|
|||||||
Reference in New Issue
Block a user