init
This commit is contained in:
parent
632aad92d1
commit
3f2a536903
@ -80,18 +80,22 @@ spec:
|
|||||||
SOURCES=$(echo "$SOURCES" | cut -s -d' ' -f2-)
|
SOURCES=$(echo "$SOURCES" | cut -s -d' ' -f2-)
|
||||||
TARGET_PATH="/workspace/base/$(params.context)/source/$(params.workspaceName)/${TARGET}"
|
TARGET_PATH="/workspace/base/$(params.context)/source/$(params.workspaceName)/${TARGET}"
|
||||||
|
|
||||||
ls -al $SRC/src
|
|
||||||
|
|
||||||
cd "$SRC"
|
cd "$SRC"
|
||||||
if [ ! -d .git ]; then
|
if [ ! -d .git ]; then
|
||||||
git init
|
git init -b main
|
||||||
git add .
|
git add .
|
||||||
git commit -m "init"
|
git commit -m "init"
|
||||||
fi
|
fi
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
echo "Importing: $SRC → $TARGET_PATH"
|
echo "Importing: $SRC → $TARGET_PATH"
|
||||||
npx nx import --sourceDirectory="$SRC" --destinationDirectory="$TARGET_PATH" --interactive=false --ref=main
|
# npx nx import --sourceDirectory="$SRC" --destinationDirectory="$TARGET_PATH" --interactive=false --ref=main
|
||||||
|
npx nx import "$SRC" "$TARGET_PATH" \
|
||||||
|
--no-interactive \ # ✅ 올바른 비대화형 플래그
|
||||||
|
--branch=main \ # 브랜치 명시
|
||||||
|
--sourceDirectory=. \ # 소스 디렉터리 루트 지정
|
||||||
|
--destinationDirectory="$TARGET_PATH"
|
||||||
|
|
||||||
echo "Updating version to $(params.version)"
|
echo "Updating version to $(params.version)"
|
||||||
sed -i.bak "s/^version = .*/version = \"$(params.version)\"/" "$TARGET_PATH/Cargo.toml"
|
sed -i.bak "s/^version = .*/version = \"$(params.version)\"/" "$TARGET_PATH/Cargo.toml"
|
||||||
rm -f "$TARGET_PATH/Cargo.toml.bak"
|
rm -f "$TARGET_PATH/Cargo.toml.bak"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user