Issue 4992 (#5009)

* change bundle name

(cherry picked from commit c3dea808adee1588e2cabc2019df0d383a4ba580)

* set primary bundle name

(cherry picked from commit 4fd1e86657b82ca975dfa34387b7ab2c4b5d92f6)

* autoupdate subdir

(cherry picked from commit 1a817285b5e20f7264432a7e9145b1e35d4e95fe)

* try passing empty strings

(cherry picked from commit 2efcafef6b439aa300c49e4e1bfe036a2a8d6b07)

* fix folder logic

(cherry picked from commit e38ce6221f1e21e0f6496c1b1f21505c1c7559b3)

* don't need empty strings duh

(cherry picked from commit c20585cbc26dd03bda87905494c573680ca7a6be)

* encapsulate ini file

---------

Co-authored-by: David Holdeman <david@chuckwagoncomputing.com>
This commit is contained in:
rusefillc 2023-01-28 23:21:55 +05:30 committed by GitHub
parent 8750dfab7b
commit e497a0456b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 7 deletions

View File

@ -390,7 +390,7 @@ jobs:
- name: Package Bundle
if: ${{( github.event_name == 'push' && github.ref == 'refs/heads/master' && env.skip != 'true' ) || inputs.lts }}
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} ${{matrix.ini-file}} ${{ github.ref_name }} ${{ toJSON(inputs.lts) }}
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} "${{matrix.ini-file}}" ${{ github.ref_name }} ${{ toJSON(inputs.lts) }}
- name: Upload .ini files
if: ${{( github.event_name == 'push' && github.ref == 'refs/heads/master' && env.skip != 'true' ) || inputs.lts }}
@ -494,7 +494,7 @@ jobs:
- name: Build Primary Bundle
# 'OS="Windows_NT"' allows us to build Windows executable on unix
run: OS="Windows_NT" bash misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh
run: OS="Windows_NT" bash misc/jenkins/functional_test_and_build_bundle/build_current_bundle.sh ${{ github.ref_name }} ${{ toJSON(inputs.lts) }}
- name: Package Bundle
if: ${{( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || inputs.lts }}

View File

@ -149,8 +149,14 @@ zip -r ../$UPDATE_BUNDLE_FILE *
cd ..
ls -l $UPDATE_BUNDLE_FILE
if [ -n "$RUSEFI_SSH_USER" ]; then
tar -czf - $UPDATE_BUNDLE_FILE | sshpass -p $RUSEFI_SSH_PASS ssh -o StrictHostKeyChecking=no $RUSEFI_SSH_USER@$RUSEFI_SSH_SERVER "tar -xzf - -C build_server/autoupdate"
retVal=$?
retVal=0
if [ "$2" = "true" ]; then
tar -czf - $UPDATE_BUNDLE_FILE | sshpass -p $RUSEFI_SSH_PASS ssh -o StrictHostKeyChecking=no $RUSEFI_SSH_USER@$RUSEFI_SSH_SERVER "mkdir -p build_server/lts/$1/autoupdate; tar -xzf - -C build_server/lts/$1/autoupdate"
retVal=$?
else
tar -czf - $UPDATE_BUNDLE_FILE | sshpass -p $RUSEFI_SSH_PASS ssh -o StrictHostKeyChecking=no $RUSEFI_SSH_USER@$RUSEFI_SSH_SERVER "mkdir -p build_server/autoupdate; tar -xzf - -C build_server/autoupdate"
retVal=$?
fi
if [ $retVal -ne 0 ]; then
echo "autoupdate upload failed"
exit 1

View File

@ -8,7 +8,11 @@ echo "RUSEFI_BUILD_FTP_USER=$RUSEFI_BUILD_FTP_USER"
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
export FOLDER="temp/snapshot_${TIMESTAMP}_${BUNDLE_NAME}_rusefi"
if [ "$4" = "true" ]; then
export FOLDER="temp/rusefi.${3}.${BUNDLE_NAME}"
else
export FOLDER="temp/rusefi.snapshot.${BUNDLE_NAME}"
fi
export BUNDLE_FULL_NAME="rusefi_bundle_${BUNDLE_NAME}"

View File

@ -66,7 +66,11 @@ bash misc/jenkins/build_simulator.sh || { echo "rusefi_simulator.exe build FAILE
STM_ARCH="stm32f407"
TIMESTAMP=$(date "+%Y%m%d_%H%M%S")
FOLDER="snapshot_${TIMESTAMP}_${STM_ARCH}_rusefi"
if [ "$2" = "true" ]; then
FOLDER="rusefi.${1}.${STM_ARCH}"
else
FOLDER="rusefi.snapshot.${STM_ARCH}"
fi
echo "$SCRIPT_NAME: folder variable1=$FOLDER"
export FOLDER="temp/$FOLDER"
echo "$SCRIPT_NAME: folder variable3=$FOLDER"
@ -74,7 +78,7 @@ echo "$SCRIPT_NAME: folder variable3=$FOLDER"
pwd
# DfuFlasher.java validates this prefix
export BUNDLE_FULL_NAME="rusefi_bundle"
bash misc/jenkins/build_working_folder.sh
bash misc/jenkins/build_working_folder.sh "$1" "$2"
[ $? -eq 0 ] || { echo "$SCRIPT_NAME: ERROR: invoking build_working_folder.sh"; exit 1; }
echo "$SCRIPT_NAME: Going back to root folder"