@@ -387,7 +387,7 @@ meta/hello_fuchsia.cm=pkg/meta/hello_fuchsia.cm
387
387
```
388
388
389
389
* 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
391
391
SDK.*
392
392
393
393
The ` .manifest ` file will be used to describe the contents of the package by
@@ -459,12 +459,10 @@ hello_fuchsia/
459
459
Next, we'll build a package manifest as defined by our manifest:
460
460
461
461
``` 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
468
466
```
469
467
470
468
This will produce ` pkg/hello_fuchsia_manifest/ ` which is a package manifest we can
498
496
We can set up our repository with:
499
497
500
498
``` sh
501
- ${SDK_PATH} /tools/${ARCH} /pm newrepo \
502
- -repo pkg/repo
499
+ ${SDK_PATH} /tools/${ARCH} /ffx repository create pkg/repo
503
500
```
504
501
505
502
** Current directory structure**
@@ -523,17 +520,17 @@ hello_fuchsia/
523
520
We can publish our new package to that repository with:
524
521
525
522
``` 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
529
526
```
530
527
531
528
Then we can add the repository to ` ffx ` 's package server as ` hello-fuchsia ` using:
532
529
533
530
``` sh
534
531
${SDK_PATH} /tools/${ARCH} /ffx repository add-from-pm \
535
- pkg/repo \
536
- -r hello-fuchsia
532
+ --repository hello-fuchsia \
533
+ pkg/repo
537
534
```
538
535
539
536
## Running a Fuchsia component on an emulator
0 commit comments