Skip to content

Commit 543cbcd

Browse files
committed
changed name of executable to archive_fusionvm
Also updated readme
1 parent 958e962 commit 543cbcd

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v1
1818
- name: Package
19-
run: tar -cvzf archive-fusionvm-${{ steps.get_version.outputs.VERSION }}.tar.gz archive_vms.zsh
19+
run: tar -cvzf archive-fusionvm-${{ steps.get_version.outputs.VERSION }}.tar.gz archive_fusionvm
2020
- name: GitHub Release
2121
uses: softprops/action-gh-release@v1
2222
with:

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
This is a zsh script for macOS Catalina and VMware Fusion
44
that suspends and archives a folder of VMs to dmg.
55

6+
## Installation
7+
8+
brew install nreilingh/nreilingh/archive-fusionvm
9+
10+
## Usage
11+
12+
archive_fusionvm path/to/folder/containing/.vmwarevm_files/ desired/output_file.dmg
13+
14+
## Contributing
15+
616
This code has unit tests! Get ZUnit with `brew install zunit`
717
and then run `zunit` in the project directory to test.
818

File renamed without changes.

tests/archive_vms.zunit renamed to tests/archive_fusionvm.zunit

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@
1212
}
1313

1414
@test 'Exit with error when no arguments are supplied' {
15-
run archive_vms.zsh
15+
run archive_fusionvm
1616

1717
assert $state equals 3
1818
}
1919

2020
@test 'Exit with error when no second argument is supplied' {
21-
run archive_vms.zsh $TEMP/decoy_dir
21+
run archive_fusionvm $TEMP/decoy_dir
2222

2323
assert $state equals 3
2424
}
2525

2626
@test 'Exit with error when first argument path does not exist' {
27-
run archive_vms.zsh /zxcvbn/foo/bar/baz/bluth $TEMP/out.dmg
27+
run archive_fusionvm /zxcvbn/foo/bar/baz/bluth $TEMP/out.dmg
2828

2929
assert $state equals 3
3030
}
3131

3232
@test 'First argument relative path is expanded to absolute path' {
3333
# $RELTEMP is also set up in bootstrap
34-
run archive_vms.zsh $RELTEMP/decoy_dir $TEMP/out.dmg
34+
run archive_fusionvm $RELTEMP/decoy_dir $TEMP/out.dmg
3535

3636
# Filter run output to line that begins with SRCPATH.
3737
srcpath=(${(M)lines:#SRCPATH*})
@@ -40,7 +40,7 @@
4040
}
4141

4242
@test 'Exit with error when first argument path is a file' {
43-
run archive_vms.zsh $TEMP/decoy_file $TEMP/out.dmg
43+
run archive_fusionvm $TEMP/decoy_file $TEMP/out.dmg
4444

4545
assert $state equals 3
4646
}
@@ -57,7 +57,7 @@
5757
$bogusvm
5858
EOF
5959

60-
run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg
60+
run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg
6161

6262
# Suspend calls are logged to file; read as array.
6363
suspendout=(${(@f)"$(<$TEMP/vmrun_suspend.calls)"})
@@ -71,7 +71,7 @@
7171
cat > $TEMP/vmrun_list_1 <<-EOF
7272
EOF
7373

74-
run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg
74+
run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg
7575

7676
if [ -f $TEMP/vmrun_suspend.calls ]; then
7777
fail 'vmrun suspend was called'
@@ -88,7 +88,7 @@
8888
$TEMP/decoy_dir/examplevm.vmx
8989
EOF
9090

91-
run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg
91+
run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg
9292

9393
suspendcalls=(${(@f)"$(<$TEMP/vmrun_suspend.calls)"})
9494

@@ -104,7 +104,7 @@
104104
$TEMP/decoy_dir/examplevm.vmx
105105
EOF
106106

107-
run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg
107+
run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg
108108

109109
assert $state equals 4
110110
if [ -f $TEMP/hdiutil.calls ]; then
@@ -115,7 +115,7 @@
115115
}
116116

117117
@test 'hdiutil create is executed' {
118-
run archive_vms.zsh $TEMP/decoy_dir $TEMP/out.dmg
118+
run archive_fusionvm $TEMP/decoy_dir $TEMP/out.dmg
119119

120120
assert "$TEMP/hdiutil.calls" exists
121121
}
@@ -124,7 +124,7 @@
124124
arg1=$TEMP/decoy_dir
125125
arg2=$TEMP/out.dmg
126126

127-
run archive_vms.zsh $arg1 $arg2
127+
run archive_fusionvm $arg1 $arg2
128128

129129
# hdiutil mock outputs calls to file; read args as array
130130
hdiutilout=(${(@f)"$(<$TEMP/hdiutil.calls)"})

0 commit comments

Comments
 (0)