Migrate
Scaffoldizr tracks compatibility between your workspace and the CLI tool using a version header. When you upgrade the scfz tool, your existing workspace may become “outdated” if it was generated with an older version.
Scaffoldizr stamps a # Generated by Scaffoldizr vX.X.X header in the workspace.dsl file to track this compatibility. When the tool version is newer than the workspace version, a warning banner will appear.
Overview
The migrate command helps you keep your workspace up to date with the latest Scaffoldizr features, script improvements, and compatibility standards.
Running the migrate command
To migrate your workspace to the current version of Scaffoldizr, run:
scfz migrate
You can also specify a destination path if your workspace is not in the current directory:
scfz migrate --dest <path>
Dry-run mode
If you want to see what changes would be applied without actually modifying any files, use the dry-run flag:
scfz migrate --dry-run
This will list all migrations that would be executed and any files that would be modified.
What migrations do
Currently, Scaffoldizr includes the following bundled migrations:
- Add version header: Stamps the
# Generated by Scaffoldizr vX.X.Xheader at the top of yourworkspace.dslfile if it is missing or outdated. - Regenerate scripts: Overwrites the workspace shell scripts with the latest bundled templates to ensure compatibility with new tool features. This affects:
scripts/run.shscripts/run.ps1scripts/update.shscripts/update.ps1
When to run
You should run the migrate command:
- Immediately after upgrading the
scfztool to a new version. - Whenever the “Your workspace is outdated!” banner appears when running
scfz.
Flags
| Flag | Shorthand | Description | Default |
|---|---|---|---|
--dest |
Path to the workspace directory | . |
|
--dry-run |
-d |
Preview changes without writing files | false |