@@ -387,7 +387,7 @@ meta/hello_fuchsia.cm=pkg/meta/hello_fuchsia.cm
387387```
388388
389389* Note: Relative manifest paths are resolved starting from the working directory
390- of ` pm ` . Make sure to fill out ` <SDK_PATH> ` with the path to the downloaded
390+ of ` ffx ` . Make sure to fill out ` <SDK_PATH> ` with the path to the downloaded
391391SDK.*
392392
393393The ` .manifest ` file will be used to describe the contents of the package by
@@ -459,12 +459,10 @@ hello_fuchsia/
459459Next, we'll build a package manifest as defined by our manifest:
460460
461461``` sh
462- ${SDK_PATH} /tools/${ARCH} /pm \
463- -api-level $( ${SDK_PATH} /tools/${ARCH} /ffx version -v | grep " api-level" | head -1 | awk -F ' ' ' {print $2}' ) \
464- -o pkg/hello_fuchsia_manifest \
465- -m pkg/hello_fuchsia.manifest \
466- build \
467- -output-package-manifest pkg/hello_fuchsia_package_manifest
462+ ${SDK_PATH} /tools/${ARCH} /ffx package build \
463+ --api-level $( ${SDK_PATH} /tools/${ARCH} /ffx --machine json version | jq .tool_version.api_level) \
464+ --out pkg/hello_fuchsia_manifest \
465+ pkg/hello_fuchsia.manifest
468466```
469467
470468This will produce ` pkg/hello_fuchsia_manifest/ ` which is a package manifest we can
498496We can set up our repository with:
499497
500498``` sh
501- ${SDK_PATH} /tools/${ARCH} /pm newrepo \
502- -repo pkg/repo
499+ ${SDK_PATH} /tools/${ARCH} /ffx repository create pkg/repo
503500```
504501
505502** Current directory structure**
@@ -523,17 +520,17 @@ hello_fuchsia/
523520We can publish our new package to that repository with:
524521
525522``` sh
526- ${SDK_PATH} /tools/${ARCH} /pm publish \
527- -repo pkg/repo \
528- -lp -f <( echo " pkg/hello_fuchsia_package_manifest " )
523+ ${SDK_PATH} /tools/${ARCH} /ffx repository publish \
524+ --package pkg/hello_fuchsia_package_manifest \
525+ pkg/repo
529526```
530527
531528Then we can add the repository to ` ffx ` 's package server as ` hello-fuchsia ` using:
532529
533530``` sh
534531${SDK_PATH} /tools/${ARCH} /ffx repository add-from-pm \
535- pkg/repo \
536- -r hello-fuchsia
532+ --repository hello-fuchsia \
533+ pkg/repo
537534```
538535
539536## Running a Fuchsia component on an emulator
0 commit comments