@@ -30,12 +30,22 @@ test('generate-sparkle-appcast stages dmg assets and preserves appcast output on
3030 'set -euo pipefail' ,
3131 `printf '%s\\n' "$@" > "${ argsLog } "` ,
3232 `cat > "${ stdinLog } "` ,
33+ 'output_path=""' ,
34+ 'for ((i=1; i<=$#; i++)); do' ,
35+ ' if [[ "${!i}" == "-o" ]]; then' ,
36+ ' j=$((i + 1))' ,
37+ ' output_path="${!j}"' ,
38+ ' break' ,
39+ ' fi' ,
40+ 'done' ,
41+ 'test -n "${output_path}"' ,
3342 'archive_dir="${!#}"' ,
3443 'test -f "${archive_dir}/GetTokens_macOS_AppleSilicon.dmg"' ,
3544 'test -f "${archive_dir}/GetTokens_macOS_Intel.dmg"' ,
3645 'test ! -f "${archive_dir}/GetTokens_macOS_AppleSilicon.tar.gz"' ,
3746 'test -f "${archive_dir}/appcast.xml"' ,
38- 'printf \'<rss>new</rss>\' > "${archive_dir}/appcast.xml"' ,
47+ 'mkdir -p "$(dirname "${output_path}")"' ,
48+ 'printf \'<rss>new</rss>\' > "${output_path}"' ,
3949 '' ,
4050 ] . join ( '\n' ) ,
4151 { mode : 0o755 } ,
@@ -60,5 +70,6 @@ test('generate-sparkle-appcast stages dmg assets and preserves appcast output on
6070 assert . match ( args , / - - d o w n l o a d - u r l - p r e f i x \n h t t p s : \/ \/ e x a m p l e .c o m \/ r e l e a s e s \/ d o w n l o a d \/ v 0 .1 .7 \/ / ) ;
6171 assert . match ( args , / - - f u l l - r e l e a s e - n o t e s - u r l \n h t t p s : \/ \/ e x a m p l e .c o m \/ r e l e a s e s \/ t a g \/ v 0 .1 .7 / ) ;
6272 assert . match ( args , / - - l i n k \n h t t p s : \/ \/ e x a m p l e .c o m \/ G e t T o k e n s / ) ;
73+ assert . match ( args , / - o \n .+ a p p c a s t \. x m l / ) ;
6374 assert . equal ( fs . readFileSync ( stdinLog , 'utf8' ) , 'test-private-key' ) ;
6475} ) ;
0 commit comments