Fix InvenTree uploads to use dev revision for MRs
- Dev branch commits: upload to "dev" revision (was dry-run) - MRs targeting main: upload to "dev" revision (was actual version) - Actual main commits: upload to versioned revision This allows pre-ordering parts during development while preventing accidental version uploads until code is actually merged. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
22
kibot-ci.yml
22
kibot-ci.yml
@@ -326,9 +326,9 @@ inventree_dev:
|
||||
artifacts: true
|
||||
script:
|
||||
- |
|
||||
echo "Running InvenTree upload in dry-run mode for dev branch"
|
||||
echo "Running InvenTree upload for dev branch (revision: dev)"
|
||||
cd hfsntree
|
||||
python main.py batch $CI_PROJECT_DIR/Fabrication --dry-run -y
|
||||
python main.py batch $CI_PROJECT_DIR/Fabrication --version-override dev -y
|
||||
|
||||
inventree_main:
|
||||
extends: .inventree_base
|
||||
@@ -357,13 +357,21 @@ inventree_main:
|
||||
expire_in: 1 week
|
||||
script:
|
||||
- |
|
||||
echo "Running InvenTree upload for main branch"
|
||||
cd hfsntree
|
||||
python main.py batch $CI_PROJECT_DIR/Fabrication -y
|
||||
|
||||
# Generate Samsung P&P files (requires parts to exist in InvenTree)
|
||||
echo "Generating Samsung pick-and-place files..."
|
||||
python main.py samsung $CI_PROJECT_DIR/Fabrication
|
||||
# MRs targeting main upload to "dev" revision for pre-ordering parts
|
||||
# Actual commits to main upload to the versioned revision
|
||||
if [[ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]]; then
|
||||
echo "Running InvenTree upload for MR (revision: dev)"
|
||||
python main.py batch $CI_PROJECT_DIR/Fabrication --version-override dev -y
|
||||
else
|
||||
echo "Running InvenTree upload for main branch (revision: $VERSION)"
|
||||
python main.py batch $CI_PROJECT_DIR/Fabrication -y
|
||||
|
||||
# Generate Samsung P&P files only on actual release
|
||||
echo "Generating Samsung pick-and-place files..."
|
||||
python main.py samsung $CI_PROJECT_DIR/Fabrication
|
||||
fi
|
||||
cd $CI_PROJECT_DIR
|
||||
|
||||
# =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user