Skip to content

Commit

Permalink
over
Browse files Browse the repository at this point in the history
Signed-off-by: acejilam <[email protected]>
  • Loading branch information
ls-2018 committed Jul 18, 2024
1 parent 537f423 commit 5580c80
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ main
dist/*
packer-plugin-scaffolding
.docs
packer*
18 changes: 18 additions & 0 deletions build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import os
import subprocess

version = 'v2.0.0'
x = []
os.system(f'go build -o packer-plugin-virtualbox_{version}_x5.0_darwin_arm64 .')
os.system(
f'zip packer-plugin-virtualbox_{version}_x5.0_darwin_arm64.zip packer-plugin-virtualbox_{version}_x5.0_darwin_arm64')
h1 = subprocess.getoutput(f'shasum -a 256 packer-plugin-virtualbox_{version}_x5.0_darwin_arm64.zip').split(' ')[0]
os.system(f'go build -o packer-plugin-virtualbox_{version}_x7.0_darwin_arm64 .')
os.system(
f'zip packer-plugin-virtualbox_{version}_x7.0_darwin_arm64.zip packer-plugin-virtualbox_{version}_x7.0_darwin_arm64')
h2 = subprocess.getoutput(f'shasum -a 256 packer-plugin-virtualbox_{version}_x7.0_darwin_arm64.zip').split(' ')[0]
x.append([h1, f'packer-plugin-virtualbox_{version}_x5.0_darwin_arm64.zip'])
x.append([h2, f'packer-plugin-virtualbox_{version}_x7.0_darwin_arm64.zip'])
with open(f'packer-plugin-virtualbox_{version}_SHA256SUMS', 'w', encoding='utf8') as f:
for item in x:
f.write(f'{item[0]} {item[1]}\n')
9 changes: 7 additions & 2 deletions builder/virtualbox/iso/step_create_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ package iso

import (
"context"
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strconv"
"strings"

Expand Down Expand Up @@ -36,8 +39,10 @@ func (s *stepCreateVM) Run(ctx context.Context, state multistep.StateBag) multis
"--ostype", config.GuestOSType, "--register",
})
commands = append(commands, []string{"--platform-architecture", "arm"})
fmt.Println(driver.Version())
fmt.Println(commands)
version, _ := driver.Version()
ioutil.WriteFile("/tmp/1.txt", []byte(version), os.ModePerm)
x, _ := json.Marshal(commands)
ioutil.WriteFile("/tmp/2.txt", x, os.ModePerm)

commands = append(commands, []string{
"modifyvm", name,
Expand Down

0 comments on commit 5580c80

Please sign in to comment.