mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-19 00:41:41 +00:00
Update pi image generation zip/xz confusion (#555)
* Add prints to image generation * Make xz multithreaded * More rename copypasta
This commit is contained in:
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -310,7 +310,7 @@ jobs:
|
||||
if: github.event_name != 'pull_request'
|
||||
with:
|
||||
name: image
|
||||
path: photonvision*.zip
|
||||
path: photonvision*.xz
|
||||
|
||||
- uses: pyTooling/Actions/releaser@r0
|
||||
with:
|
||||
@@ -319,7 +319,7 @@ jobs:
|
||||
rm: true
|
||||
files: |
|
||||
photon-server/build/libs/*.jar
|
||||
photonvision*.zip
|
||||
photonvision*.xz
|
||||
if: github.event_name == 'push'
|
||||
|
||||
photon-release:
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -30,6 +30,7 @@ backend/settings/
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.xz
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
# We need to look for a JAR with the "-raspi" suffix so we don't accidentally bundle the big jar
|
||||
# Not that it really matters, but it'll save us 50 megs or so
|
||||
NEW_JAR=$(realpath $(find . -name photonvision\*-raspi.jar))
|
||||
echo "Using jar: " $NEW_JAR
|
||||
sudo apt install xz-utils
|
||||
curl -sk https://api.github.com/repos/photonvision/photon-pi-gen/releases/tags/v2023.1.0-beta-1 | grep "browser_download_url.*xz" | cut -d : -f 2,3 | tr -d '"' | wget -qi -
|
||||
ls
|
||||
FILE_NAME=$(ls | grep image_*.xz)
|
||||
xz -v --decompress $FILE_NAME
|
||||
echo "Downloaded " $FILE_NAME
|
||||
xz -T0 -v --decompress $FILE_NAME
|
||||
IMAGE_FILE=$(ls | grep *.img)
|
||||
ls
|
||||
echo "Unziped image: " $IMAGE_FILE
|
||||
TMP=$(mktemp -d)
|
||||
LOOP=$(sudo losetup --show -fP "${IMAGE_FILE}")
|
||||
sudo mount ${LOOP}p2 $TMP
|
||||
@@ -16,8 +21,7 @@ sudo cp $NEW_JAR photonvision.jar
|
||||
popd
|
||||
sudo umount ${TMP}
|
||||
sudo rmdir ${TMP}
|
||||
rm $FILE_NAME
|
||||
NEW_IMAGE=$(basename "${NEW_JAR/jar/img}")
|
||||
mv $IMAGE_FILE $NEW_IMAGE
|
||||
xz -v -z $NEW_IMAGE
|
||||
mv $NEW_IMAGE.xz $(basename "${NEW_JAR/.jar/-image.zip}")
|
||||
xz -T0 -v -z $NEW_IMAGE
|
||||
mv $NEW_IMAGE.xz $(basename "${NEW_JAR/.jar/-image.xz}")
|
||||
|
||||
Reference in New Issue
Block a user