Skip to content

Commit

Permalink
Adds Upgrade key (aggregates an Update action with additions for up…
Browse files Browse the repository at this point in the history
…grading). +Case sensitivity for the Action names.

Today's an Upgrade action:
```
DllExport -action Upgrade ...
```

is equal to:

```
DllExport -action Update -mgr-up -force ...
```

See updated doc:
https://github.com/3F/DllExport/wiki/DllExport-Manager

+`-action Default` for nothing.
  • Loading branch information
3F committed Aug 3, 2018
1 parent 80becd2 commit 8e69221
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Wizard/ActionType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ public enum ActionType: uint
/// </summary>
Unset,

/// <summary>
/// Aggregates an Update action with additions for upgrading.
/// TODO: Currently is equal to the Update action.
/// </summary>
Upgrade = Update,

/// <summary>
/// To list projects and their statuses. As plain text data.
/// TODO:
Expand Down
2 changes: 1 addition & 1 deletion Wizard/DllExportCfgTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public string Action
typeof(ActionType),
value.Trim(),
//char.ToUpperInvariant(value[0]) + value.Substring(1).ToLowerInvariant()
true
false
);
}
}
Expand Down
6 changes: 4 additions & 2 deletions Wizard/Executor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ public void Configure()
case ActionType.Restore:
case ActionType.Update:
case ActionType.Export:
case ActionType.Unset:
case ActionType.Default: {
case ActionType.Unset: {
Configure(ActivateSln());
break;
}
Expand All @@ -170,6 +169,9 @@ public void Configure()
UI.App.RunSTA(new UI.InfoForm(this));
break;
}
case ActionType.Default: {
return;
}
default: throw new NotImplementedException();
}
}
Expand Down
11 changes: 9 additions & 2 deletions Wizard/Manager.bat
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,12 @@ echo * Restore - To restore configured DllExport.
echo * Export - To export configured projects data.
echo * Recover - To re-configure projects via predefined/exported data.
echo * Unset - To unset all data from specified projects.
echo * Upgrade - Aggregates an Update action with additions for upgrading.
echo.
echo -sln-dir {path} - Path to directory with .sln files to be processed.
echo -sln-file {path} - Optional predefined .sln file to process via the restore operations etc.
echo -metalib {path} - Relative path from PkgPath to DllExport meta library.
echo -dxp-target {path} - Relative path to .target file of the DllExport.
echo -dxp-target {path} - Relative path to entrypoint wrapper of the main core.
echo -dxp-version {num} - Specific version of DllExport. Where {num}:
echo * Versions: 1.6.0 ...
echo * Keywords:
Expand All @@ -98,7 +99,7 @@ echo -proxy {cfg} - To use proxy. The format: [usr[:pwd]@]host[:port]
echo -pkg-link {uri} - Direct link to package from the source via specified URI.
echo -force - Aggressive behavior, e.g. like removing pkg when updating.
echo -mgr-up - Updates this manager to version from '-dxp-version'.
echo -wz-target {path} - Relative path to .target file of the Wizard.
echo -wz-target {path} - Relative path to entrypoint wrapper of the main wizard.
echo -pe-exp-list {module} - To list all available exports from PE32/PE32+ module.
echo -eng - Try to use english language for all build messages.
echo -GetNuTool {args} - Access to GetNuTool core. https://github.com/3F/GetNuTool
Expand Down Expand Up @@ -276,6 +277,12 @@ if defined dxpVersion (
)
)

if z%wAction%==zUpgrade (
call :dbgprint "Upgrade is on"
set /a mgrUp=1
set /a kForce=1
)

call :trim dxpPackages
set "dxpPackages=!dxpPackages!\\"

Expand Down
5 changes: 5 additions & 0 deletions tools/DllExport.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
==================================================
DllExport -action Configure -dxp-version $-version-$
==================================================

To upgrade configured version on v$-version-$:
==================================================
DllExport -action Upgrade -dxp-version $-version-$
==================================================
https://3F.github.io/DllExport/releases/latest/manager/


Expand Down

0 comments on commit 8e69221

Please sign in to comment.