Skip to content

Commit

Permalink
test git name for all
Browse files Browse the repository at this point in the history
  • Loading branch information
hredan committed Feb 9, 2025
1 parent 894296a commit a832170
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: run PyInstaller in docker
run: |
docker build --platform linux/arm64 -t python_eef:arm64 -f ./Dockerfile_arm .
docker run -v $(pwd):/home/workspace -w /home/workspace -i --platform linux/arm64 --env GIT_HASH=${{github.sha}} --env GIT_URL=${{github.repository}} python_eef:arm64 bash /home/workspace/Scripts/build_linux_arm.sh
docker run -v $(pwd):/home/workspace -w /home/workspace -i --platform linux/arm64 --env GIT_HASH=${{github.sha}} --env GIT_URL=${{github.repository}} --env GIT_NAME=${{github.ref_name}} python_eef:arm64 bash /home/workspace/Scripts/build_linux_arm.sh
cp -r ./dist ./ESPEasyFlasher
tar -czf ./ESPEasyFlasher_linux_arm64.tar.gz ./ESPEasyFlasher
- name: Create LinuxArm64 Artefact
Expand All @@ -99,7 +99,7 @@ jobs:
- name: run PyInstaller in docker
run: |
docker build --platform linux/arm/v7 -t python_eef:armv7 -f ./Dockerfile_arm .
docker run -v $(pwd):/home/workspace -w /home/workspace -i --platform linux/arm/v7 --env GIT_HASH=${{github.sha}} --env GIT_URL=${{github.repository}} python_eef:armv7 bash /home/workspace/Scripts/build_linux_arm.sh
docker run -v $(pwd):/home/workspace -w /home/workspace -i --platform linux/arm/v7 --env GIT_HASH=${{github.sha}} --env GIT_URL=${{github.repository}} --env GIT_NAME=${{github.ref_name}} python_eef:armv7 bash /home/workspace/Scripts/build_linux_arm.sh
cp -r ./dist ./ESPEasyFlasher
tar -czf ./ESPEasyFlasher_linux_armv7.tar.gz ./ESPEasyFlasher
- name: Create LinuxArmv7 Artefact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main_ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
needs: test
uses: ./.github/workflows/build_targets.yml
with:
target: 'linux64'
target: 'all'
2 changes: 1 addition & 1 deletion Scripts/build_linux_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ python3 -m venv /home/venv
source /home/venv/bin/activate

pip install -r requirements.txt
python ./Scripts/build_info.py -s $GIT_HASH -r $GIT_URL
python ./Scripts/build_info.py -s $GIT_HASH -r $GIT_URL -n $GIT_NAME
python -m PyInstaller -F --collect-data esptool --add-data "./LogoEasyFlash.png:." --add-data "build_info.txt:." --name ESPEasyFlasher espeasyflasher.py
cp ./ESPEasyFlasherConfig.json ./dist
cp ./build_info.txt ./dist
Expand Down
9 changes: 8 additions & 1 deletion Scripts/build_macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ else
GIT_HASH=$(git rev-parse HEAD)
fi

python3 ./Scripts/build_info.py -s $GIT_HASH -r $GIT_URL
if [ -n "$GITHUB_REF_NAME" ]
then
GIT_NAME=$GITHUB_REF_NAME
else
GIT_NAME=$(git rev-parse --abbrev-ref HEAD)
fi

python3 ./Scripts/build_info.py -s $GIT_HASH -r $GIT_URL -n $GIT_NAME
python3 -m PyInstaller -F --windowed --collect-data esptool --add-data "./LogoEasyFlash.png:." --add-data "build_info.txt:." --icon "./resource/macOs/SleepUino.icns" --name ESPEasyFlasher espeasyflasher.py
cp ./ESPEasyFlasherConfig.json ./dist/ESPEasyFlasher.app/Contents/MacOS
cp ./build_info.txt ./dist/ESPEasyFlasher.app/Contents/MacOS
Expand Down

0 comments on commit a832170

Please sign in to comment.