diff --git a/tasks/rust-nx-merge/task.yaml b/tasks/rust-nx-merge/task.yaml index 12a27a9..49e4894 100644 --- a/tasks/rust-nx-merge/task.yaml +++ b/tasks/rust-nx-merge/task.yaml @@ -80,18 +80,22 @@ spec: SOURCES=$(echo "$SOURCES" | cut -s -d' ' -f2-) TARGET_PATH="/workspace/base/$(params.context)/source/$(params.workspaceName)/${TARGET}" - ls -al $SRC/src - cd "$SRC" if [ ! -d .git ]; then - git init + git init -b main git add . git commit -m "init" fi cd - 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)" sed -i.bak "s/^version = .*/version = \"$(params.version)\"/" "$TARGET_PATH/Cargo.toml" rm -f "$TARGET_PATH/Cargo.toml.bak"