mirror of https://github.com/FOME-Tech/fome-fw.git
upload ini from firmware build (#4456)
This commit is contained in:
parent
6218edd040
commit
2bfa3be1dc
|
@ -354,6 +354,10 @@ jobs:
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && env.skip != 'true' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && env.skip != 'true' }}
|
||||||
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} ${{matrix.ini-file}}
|
run: bash misc/jenkins/compile_other_versions/prepare_bundle.sh ${{matrix.build-target}} ${{matrix.ini-file}}
|
||||||
|
|
||||||
|
- name: Upload .ini files
|
||||||
|
working-directory: ./firmware/tunerstudio/generated
|
||||||
|
run: ../upload_ini.sh ${{matrix.ini-file}} ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
||||||
|
|
||||||
- name: Upload build elf
|
- name: Upload build elf
|
||||||
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' && env.skip != 'true' }}
|
if: ${{ github.event_name != 'push' || github.ref != 'refs/heads/master' && env.skip != 'true' }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|
|
@ -80,10 +80,6 @@ jobs:
|
||||||
github_token: ${{ github.token }}
|
github_token: ${{ github.token }}
|
||||||
branch: ${{ steps.extract_branch.outputs.branch }}
|
branch: ${{ steps.extract_branch.outputs.branch }}
|
||||||
|
|
||||||
- name: Upload .ini files
|
|
||||||
working-directory: ./firmware/tunerstudio/generated
|
|
||||||
run: ../upload_ini.sh ${{ secrets.RUSEFI_ONLINE_FTP_USER }} ${{ secrets.RUSEFI_ONLINE_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }}
|
|
||||||
|
|
||||||
- name: Print Compiler version
|
- name: Print Compiler version
|
||||||
# NOTE: on mac, this is actually symlink'd to clang, not gcc, but that's ok - we want to build on both
|
# NOTE: on mac, this is actually symlink'd to clang, not gcc, but that's ok - we want to build on both
|
||||||
working-directory: .
|
working-directory: .
|
||||||
|
|
|
@ -1,10 +1,16 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# user=$1
|
# file=$1
|
||||||
# pass=$2
|
# user=$2
|
||||||
# host=$3
|
# pass=$3
|
||||||
|
# host=$4
|
||||||
|
|
||||||
if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then
|
if [ ! "$1" ]; then
|
||||||
|
echo "No file"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! "$2" ] || [ ! "$3" ] || [ ! "$4" ]; then
|
||||||
echo "No Secrets"
|
echo "No Secrets"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -13,10 +19,9 @@ pwd
|
||||||
echo -e "\nUploading .ini files"
|
echo -e "\nUploading .ini files"
|
||||||
ls -l .
|
ls -l .
|
||||||
|
|
||||||
for f in *.ini; do if [[ -f "$f" ]]; then
|
echo "Processing file $1:"
|
||||||
echo "Processing file $f:"
|
sig=$(grep "^ *signature *=" $1 | cut -f2 -d "=")
|
||||||
sig=$(grep "^ *signature *=" $f | cut -f2 -d "=")
|
if [ ! -z "$sig" -a "$sig" != " " ]; then
|
||||||
if [ ! -z "$sig" -a "$sig" != " " ]; then
|
|
||||||
echo "* found signature: $sig"
|
echo "* found signature: $sig"
|
||||||
if [[ "$sig" =~ rusEFI.*([0-9]{4})\.([0-9]{2})\.([0-9]{2})\.([a-zA-Z0-9_-]+)\.([0-9]+) ]]; then
|
if [[ "$sig" =~ rusEFI.*([0-9]{4})\.([0-9]{2})\.([0-9]{2})\.([a-zA-Z0-9_-]+)\.([0-9]+) ]]; then
|
||||||
year=${BASH_REMATCH[1]}
|
year=${BASH_REMATCH[1]}
|
||||||
|
@ -28,13 +33,13 @@ for f in *.ini; do if [[ -f "$f" ]]; then
|
||||||
echo "* found path: $path"
|
echo "* found path: $path"
|
||||||
# we do not have ssh for this user
|
# we do not have ssh for this user
|
||||||
# sftp does not support -p flag on mkdir :(
|
# sftp does not support -p flag on mkdir :(
|
||||||
sshpass -p $2 sftp -o StrictHostKeyChecking=no $1@$3 <<SSHCMD
|
sshpass -p $3 sftp -o StrictHostKeyChecking=no $2@$4 <<SSHCMD
|
||||||
cd rusefi
|
cd rusefi
|
||||||
mkdir $year
|
mkdir $year
|
||||||
mkdir $year/$month
|
mkdir $year/$month
|
||||||
mkdir $year/$month/$day
|
mkdir $year/$month/$day
|
||||||
mkdir $year/$month/$day/$board
|
mkdir $year/$month/$day/$board
|
||||||
put $f $path
|
put $1 $path
|
||||||
SSHCMD
|
SSHCMD
|
||||||
retVal=$?
|
retVal=$?
|
||||||
if [ $retVal -ne 0 ]; then
|
if [ $retVal -ne 0 ]; then
|
||||||
|
@ -45,5 +50,4 @@ SSHCMD
|
||||||
else
|
else
|
||||||
echo "Unexpected $sig"
|
echo "Unexpected $sig"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi; done
|
|
||||||
|
|
Loading…
Reference in New Issue