[fx set] run in $FUCHSIA_DIR, new invariant

There have been several bugs stemming from the fact that set was not changing
it's directory. It produces GN arguments, many of which want to be relative
to $FUCHSIA_DIR, rather than absolute. The build has similar invariants, with
// being $FUCHSIA_DIR, and the build directory being the working directory
during build execution.

Test: fx set from sub-directory of root picks up a board file.
Bug: BLD-352 #done
Change-Id: If6a0e351ce4c5f52e1a6011387ce2fca27156934
1 file changed
tree: a4d56173421ee4e9c4767a4ad8975326d5a1cac9
  1. crash/
  2. dart/
  3. devshell/
  4. editors/
  5. gce/
  6. gdb/
  7. manifest/
  8. memory/
  9. packages/
  10. rust/
  11. sdk/
  12. style/
  13. tests/
  14. third_party/
  15. vim/
  16. youcompleteme/
  17. zsh-completion/
  18. .gitignore
  19. AUTHORS
  20. bootstrap
  21. build-qemu.sh
  22. build-zircon.sh
  23. build_id_conv.py
  24. check-gn-format
  25. colorize_logs
  26. CONTRIBUTING.md
  27. fd.py
  28. fetch-build-artifacts
  29. find_integration_revision.py
  30. flog
  31. fx
  32. fx-env.sh
  33. fx-wrapper
  34. generate-intellij-config.py
  35. git-file-tidy
  36. git-fuchsia-review
  37. git_utils.py
  38. gn_to_cmake.py
  39. LICENSE
  40. list-available-packages.py
  41. MAINTAINERS
  42. PATENTS
  43. paths.py
  44. README.md
  45. run-dart-action.py
  46. run-zircon-arm64
  47. run-zircon-x86
  48. start-dhcp-server.sh
  49. update-manifest.go
README.md

Scripts

This repository is for scripts useful when hacking on Fuchsia. This repository should contain scripts that perform tasks spanning multiple repositories. Scripts that only operate within a single repository should live in the relevant repository.

push-package.py

The push-package.py script pushes the files listed in the given manifests files. No checking is performed for incremental changes.

The sample command lines below can be used to build Modular and then push those files to the default device. This assumes you have already booted your device with a version of Fuchsia that contains the most recent version of all other packages. This command line uses the “system_manifest” file from each of the modular directories, such as modular, modular_dev, and modular_tests.

cd $FUCHSIA_DIR
fx build peridot:modular_all
scripts/push-package.py out/debug-x64/package/modular*/system_manifest

fx publish

fx publish will take a package from the build and create a Fuchsia package manager package from a build package. It will then add the package to a local update respository which, by default, is put at ${FUCHSIA_BUILD_DIR}/amber-files. It will also add the package content files to the update repository and name these file after their Merkle Root. If a package name is supplied to fx publish, only that package will be processed. If no name is supplied, all the packages made by the build will be included.