rush-archive-project-plugin
v1.2.2
Published
Rush plugin to archive project
Downloads
103
Readme
rush-archive-project-plugin
A rush plugin for archive/unarchive project source code in monorepo.
Prerequisite
Rush.js >= 5.57.0
Quick Start
- Enabling this rush plugin
Please follow the official doc to enable this plugin in your repo.
- Running archive project command
rush archive-project --package-name <your_package_name>
restoring your code by
rush unarchive-project --package-name <your_package_name>
Archive working process
- Find project configuration by Rush.js SDK
- Check whether there are projects depends on target project
- Run
git clean -xdf
under project folder - Create a checkpoint branch with the name
${projectName}-checkpoint-${date}
- Update checkpoint branch information in
common/_graveyard/projectCheckpoints.json
file - Record project configuration into
rush-metadata.json
file - Create a tarball by running
tar -czf <unscoped_package_name>.tar.gz -C <project_folder> .
- Move the tarball to
common/_graveyard
folder - Remove project config to
rush.json
- Delete project folder
Unarchive working process
- Find the tarball by
packageName
- Extract the tarball by running
tar xf <package_name>.tar.gz
- Get project configuration by reading
rush-metadata.json
- Remove checkpoint branch information from checkpoint metadata file if it exists
- Move the code to project folder
- Restore project configuration into
rush.json
- Delete metadata file and tarball