Skip to content

Commit

Permalink
Clean up and comment the build script
Browse files Browse the repository at this point in the history
  • Loading branch information
WestfW committed Aug 7, 2015
1 parent 87a0cdb commit 8169eb5
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
14 changes: 11 additions & 3 deletions optiboot/package_optiboot_optiboot-additional_index.json.TEMPLATE
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,21 @@
"name": "Optiboot %VERSION%",
"architecture": "avr",
"version": "0.%VERSION%",
#
# 3r party packages must use "Contributed"
#
"category": "Contributed",
"help": {
"online": ""
"online": "https://github.com/Optiboot/optiboot/wiki"
},
"url": "https://github.com/Optiboot/optiboot/releases/download/v%VERSION%/optiboot.zip",
"archiveFileName": "optiboot.zip",
#
# Package file verification data
#
"checksum": "SHA-256:%HASH%",
"size": "%SIZE%",
#
"boards": [
{"name": "New Optiboot"}
],
Expand All @@ -42,7 +49,8 @@
}
]
}
]
],
"tools": []
}
]
}
}
23 changes: 19 additions & 4 deletions optiboot/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,23 @@ rm -Rf /tmp/optiboot-release
# Note that the structure under "packages" (handed by boards manager)
# is different than the structure under "sketchbook/hardware" would be.

mkdir -p /tmp/optiboot-release/Optiboot/bootloaders/optiboot
TOP=/tmp/optiboot-release/Optiboot/
#
# Bootloaders directory
mkdir -p $TOP/bootloaders/optiboot
# cores, variants, libraries
# mkdir -p $TOP/variants/
mkdir -p $TOP/libraries/
# Less common: firmware, system.
# mkdir -p $TOP/firmwares/
# mkdir -p $TOP/system/

#
# Copy files from whereever into the release director
cp ../../boards-1.6.txt $TOP/boards.txt
#cp -R ../../examples $TOP/libraries/
#cp -R ../../variants $TOP/
#cp -R ../../system $TOP/

#
# Create platform.tx, because it contains the "group" name for the boards menu
Expand Down Expand Up @@ -50,9 +64,10 @@ pushd /tmp/optiboot-release
zip -r Optiboot.zip Optiboot
HASH=`openssl dgst -sha256 Optiboot.zip | sed -e 's/.* //'`
SIZE=`stat -f %z Optiboot.zip`
echo size = $SIZE
echo hash = $HASH
popd
echo sed -e "s/%HASH%/$HASH/" -e "s/%VERSION%/$1/" -e "s/%SIZE%/$SIZE/" ../../package_optiboot_optiboot-additional_index.json.TEMPLATE
sed -e "s/#.*//" -e "s/%HASH%/$HASH/" -e "s/%VERSION%/$1/" -e "s/%SIZE%/$SIZE/" ../../package_optiboot_optiboot-additional_index.json.TEMPLATE > /tmp/optiboot-release/package_optiboot_optiboot-additional_index.json

#
# This leaves the .zip and the .json file in /tmp/optiboot-release
# where it can be copied to a suitable network location.

0 comments on commit 8169eb5

Please sign in to comment.