Skip to content

Commit

Permalink
fix vbox build
Browse files Browse the repository at this point in the history
  • Loading branch information
benjamink committed Jan 20, 2025
1 parent 7a73d06 commit a27d33b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:

# Runs a set of commands using the runners shell
- name: Manual Build
run: ./packer_build.sh -v ${{ github.event.inputs.version }}
run: ./packer_build.sh -u -v ${{ github.event.inputs.version }}
1 change: 1 addition & 0 deletions fujinet.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ source "virtualbox-iso" "fujinet" {
"auto lowmem/low=true preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/vbox-preseed.cfg netcfg/get_hostname=fujinet-vm<enter><wait><enter>"
]
vboxmanage = [
["modifyvm", "{{.Name}}", "--nat-localhostreachable1", "on"],
["modifyvm", "{{.Name}}", "--memory", "4096"],
["modifyvm", "{{.Name}}", "--cpus", "2"],
["modifyvm", "{{.Name}}", "--draganddrop", "bidirectional"],
Expand Down
Empty file removed output/.gitkeep
Empty file.
14 changes: 12 additions & 2 deletions packer_build.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
#!/usr/bin/env bash
set -x

VERSION="test"
COPY_ONLY="false"
CLEAN_ALL="false"
LOCAL_ONLY="true"
OUTPUT_FLAG=""

function usage() {
echo "$0 [-o build_output] [-v version] [-l] [-c] [-n] [-h]"
echo "$0 [-o build_output] [-v version] [-l] [-c] [-x] [-n] [-h]"
echo
echo " -o <build_output> Set the type of VM to build (default 'virtualbox-iso', alternative 'qemu', 'vmware-iso')"
echo " -v <version> Provide a version for the VM build (default: 'test')"
echo " -u If set build WILL be uploaded to MEGA (local only)"
echo " -c Just copy the OVA to MEGA"
echo " -x Clean all former builds"
echo " -n Disable (no) color"
echo " -h Display this help"
echo
exit 1
}

while getopts "v:o:lucnh" opt
while getopts "v:o:lucxnh" opt
do
case "$opt" in
o) OUTPUT_TYPE="$OPTARG" ;;
v) VERSION="$OPTARG" ;;
u) LOCAL_ONLY="false" ;;
c) COPY_ONLY="true" ;;
x) CLEAN_ALL="true" ;;
n) COLOR_FLAG="-color=false" ;;
*) usage ;;
esac
Expand All @@ -35,6 +39,12 @@ then
OUTPUT_FLAG="-only=build.${OUTPUT_TYPE}.fujinet"
fi

if [[ "$CLEAN_ALL" == "true" ]]
then
rm -rf "$HOME/VirtualBox\ VMs/fujinet-debian12-vbox"
rm -f "./output*/*"
fi

if [[ "$VERSION" != "test" ]]
then
git tag "$VERSION"
Expand Down

0 comments on commit a27d33b

Please sign in to comment.