Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersign committed Feb 9, 2018
2 parents cb03329 + e6be24c commit d70690e
Show file tree
Hide file tree
Showing 31 changed files with 1,416 additions and 229 deletions.
14 changes: 12 additions & 2 deletions BenchManager/BenchCLI/Commands/TransferInstallCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace Mastersign.Bench.Cli.Commands
class TransferInstallCommand : BenchCommand
{
private const string OPTION_TARGET_DIR = "target-dir";
private const string FLAG_EXTRACT_ONLY = "extract-only";

public override string Name => "install";

Expand All @@ -29,12 +30,20 @@ protected override void InitializeArgumentParser(ArgumentParser parser)
optionTargetDir.PossibleValueInfo
.Text("A path to a directory. The directory must not exist yet.");

var flagExtractOnly = new FlagArgument(FLAG_EXTRACT_ONLY, 'e',
"extract", "no-init");
flagExtractOnly.Description
.Text("Deactivates automatic initialization and setup after the transfer.");

parser.RegisterArguments(
optionTargetDir);
optionTargetDir,
flagExtractOnly);
}

private string TargetDir => Arguments.GetOptionValue(OPTION_TARGET_DIR);

private bool ExtractOnly => Arguments.GetFlag(FLAG_EXTRACT_ONLY);

protected override bool ExecuteCommand(string[] args)
{
var targetDir = TargetDir;
Expand All @@ -46,10 +55,11 @@ protected override bool ExecuteCommand(string[] args)
{
return false;
}
var extractOnly = ExtractOnly;
WriteDetail("Installing a new Bench environment to: " + targetDir);
try
{
BenchTasks.InstallBenchEnvironment(RootPath, targetDir);
BenchTasks.InstallBenchEnvironment(RootPath, targetDir, startInitialization: !extractOnly);
}
catch (Exception e)
{
Expand Down
4 changes: 2 additions & 2 deletions BenchManager/BenchCLI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.17.2.0")]
[assembly: AssemblyFileVersion("0.17.2.0")]
[assembly: AssemblyVersion("0.17.3.0")]
[assembly: AssemblyFileVersion("0.17.3.0")]
4 changes: 2 additions & 2 deletions BenchManager/BenchDashboard/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.17.2.0")]
[assembly: AssemblyFileVersion("0.17.2.0")]
[assembly: AssemblyVersion("0.17.3.0")]
[assembly: AssemblyFileVersion("0.17.3.0")]
8 changes: 6 additions & 2 deletions BenchManager/BenchLib/BenchTasks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2943,10 +2943,14 @@ private static bool ExportBenchEnvironmentArchive(IBenchManager man, string targ
/// </summary>
/// <param name="benchRoot">The directory of the extracted transfer package.</param>
/// <param name="targetDirectory">The directory to install the new Bench environment in.</param>
public static void InstallBenchEnvironment(string benchRoot, string targetDirectory)
/// <param name="startInitialization">A flag to indicate that the initialization should be started after the extraction.</param>
public static void InstallBenchEnvironment(string benchRoot, string targetDirectory, bool startInitialization = true)
{
FileSystem.CopyDir(benchRoot, targetDirectory, true);
LaunchRemoteSetup(targetDirectory);
if (startInitialization)
{
LaunchRemoteSetup(targetDirectory);
}
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions BenchManager/BenchLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.17.2.0")]
[assembly: AssemblyFileVersion("0.17.2.0")]
[assembly: AssemblyVersion("0.17.3.0")]
[assembly: AssemblyFileVersion("0.17.3.0")]
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ Add a link to the GitHub diff like

[Unreleased]: https://github.com/mastersign/bench/compare/master...dev

## [0.17.3] - 2018-02-09

[0.17.3]: https://github.com/mastersign/bench/compare/v0.17.2...v0.17.3

### Added
- New Bench CLI flag `bench transfer install --extract-only` to suppress
automatic initialization and setup during extraction of `BenchSetup.exe`.
This is possible because command line arguments to `BenchSetup.exe` are passed
to `bench.exe --verbose transfer install` during the bootstrap command.
- `res\Invoke-BenchSetup.ps1` for automated Bench setups

## [0.17.2] - 2018-02-05

[0.17.2]: https://github.com/mastersign/bench/compare/v0.17.1...v0.17.2
Expand Down
2 changes: 1 addition & 1 deletion build/update-bench-cli-docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $myDir = [IO.Path]::GetDirectoryName($MyInvocation.MyCommand.Definition)
$rootDir = [IO.Path]::GetDirectoryName($myDir)

$docsDir = "$rootDir\docs"
$targetFile = "$docsDir\content\ref\bench-cli.md"
$targetFile = "$docsDir\src-content\ref\bench-cli.md"

@"
+++
Expand Down
2 changes: 1 addition & 1 deletion build/watch-docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ $env.Load()
cd $docsDir
Start-Process gulp watch
Start-Process "http://localhost:1313/bench/"
hugo server -D
hugo server --disableFastRender
10 changes: 4 additions & 6 deletions docs/content/guide/selection.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
+++
date = "2016-06-22T13:24:59+02:00"
date = "2018-02-09T12:00:00+02:00"
description = "The activation of apps, app groups and their dependencies"
title = "App Activation"
weight = 5
+++

[Bench App Library]: /ref/file-structure/#res-apps
[User App Library]: /ref/file-structure/#config-apps
[Activated Apps]: /ref/file-structure/#config-apps-activated
[Deactivated Apps]: /ref/file-structure/#config-apps-deactivated
Expand Down Expand Up @@ -38,18 +37,17 @@ app removal, and others, it uses a list of active apps to know which apps
to setup or remove.
To compile this list, Bench reads the following files

* [`res\apps.md`][Bench App Library]
* `lib\applibs\<app lib name>\apps.md`
* [`config\apps.md`][User App Library]
* [`config\apps-activated.txt`][Activated Apps]
* [`Config\apps-deactivated.txt`][Deactivated Apps]

The compilation works in the following order:

1. At first Bench reads the [Bench App Library][] `res\apps.md` to load the
app definitions included in Bench.
1. At first Bench reads the loaded app libraries `lib\applibs\*\apps.md`
2. Next it reads the [User App Library][] `config\app.md` to load overrides
and user defined apps.
3. Some apps in the [Bench App Library][] are listed in the app category
3. Some apps in the bench core app library are listed in the app category
_Required_ and are thereby activated implicitely.
4. Bench than reads the [user activated apps][Activated Apps] in
`config\apps-activated.txt` and activates the listed apps explicitely.
Expand Down
4 changes: 3 additions & 1 deletion docs/content/home/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ weight = 3

<a class="setup-download-button pure-button"
href="https://github.com/mastersign/bench/releases/latest">
<i class="fa fa-download"></i>&nbsp;&nbsp;BenchSetup.exe
<i class="button-ico fa fa-download"></i>
BenchSetup.exe<br>
<small class="version-info">latest</small>
</a>

1. Create a folder for Bench.
Expand Down
13 changes: 9 additions & 4 deletions docs/content/ref/bench-cli.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
+++
date = "2017-11-13T15:24:36+01:00"
date = "2018-02-09T12:49:30+01:00"
description = "The command-line interface: bench.exe"
title = "Bench CLI"
weight = 2
+++

Version: 0.17.0
Version: 0.17.3

The _Bench CLI_ allows to interact with a Bench environment on the command line.

Expand Down Expand Up @@ -838,7 +838,7 @@ Syntax: `bench` `transfer` `export` _&lt;option&gt;_\* _&lt;target-file&gt;
#### [ `install`, `i`](#cmd_bench-transfer-install)
Install a Bench environment from an extracted Bench transfer package

Syntax: `bench` `transfer` `install` _&lt;option&gt;_\*
Syntax: `bench` `transfer` `install` ( _&lt;flag&gt;_ | _&lt;option&gt;_)\*

## bench transfer clone {#cmd_bench-transfer-clone}
Command: `bench` `transfer` `clone`
Expand Down Expand Up @@ -898,7 +898,12 @@ The `install` command installs a Bench environment from an extracted Bench tran
### Usage {#cmd_bench-transfer-install_usage}

* `bench` `transfer` `install` `-?`
* `bench` ( _&lt;flag&gt;_ | _&lt;option&gt;_)\* `transfer` `install` _&lt;option&gt;_\*
* `bench` ( _&lt;flag&gt;_ | _&lt;option&gt;_)\* `transfer` `install` ( _&lt;flag&gt;_ | _&lt;option&gt;_)\*

### Flags {#cmd_bench-transfer-install_flags}

#### `--extract-only` | `--extract` | `--no-init` | `-e`
Deactivates automatic initialization and setup after the transfer.

### Options {#cmd_bench-transfer-install_options}

Expand Down
14 changes: 8 additions & 6 deletions docs/content/start/install.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
+++
date = "2018-02-03T14:00:00+02:00"
date = "2018-02-08T12:00:00+02:00"
description = "How do I get Bench up and running?"
title = "Installing Bench"
weight = 1
+++

[bootstrap-file]: https://github.com/mastersign/bench/raw/master/res/bench-install.bat

At first create a folder for Bench on your harddrive or a thumbdrive.
<a class="setup-download-button pure-button"
href="https://github.com/mastersign/bench/releases/latest">
<i class="fa fa-download"></i>&nbsp;&nbsp;BenchSetup.exe
</a>
<script type="application/javascript">GetLatestReleaseInfo();</script>

The most comfortable way of installing Bench is with the setup program
<a href="https://github.com/mastersign/bench/releases/latest"
class="setup-download-link">`BenchSetup.exe`</a>.
At first create a folder for Bench on your harddrive or a thumbdrive.

<script type="application/javascript">GetLatestReleaseInfo();</script>
Then download the setup program `BenchSetup.exe`.

The current web browsers are quite protective if it comes to downloaded
executable files.
Expand Down
34 changes: 18 additions & 16 deletions docs/content/tutorial/apps-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ weight = 3
[Bench CLI]: /ref/bench-cli
[Bench Shell]: /guide/shell

The most apps, included in bench, are defined with a specific version number.
You need to upgrade the whole Bench system, to get the latest Bench app library
with newer app versions. But some apps are defined without a version number,
and can be upgraded at any time.
Most apps, included in the default app library, are defined with a specific version number.
These apps can be upgraded when the app library was updated.
But some apps are defined without a version number, and can be upgraded at any time.
And then there are managed packages like NPM or PIP packages.
The app definitions for these can define a range of versions and allow
upgrading the package in the given version interval too, without retrieving
a new app library.
And last but not least, you can override the version number of an app in
the user app library, if the Bench app library is outdated.
the user app library, if the app library is outdated.
<!--more-->

**Overview**
Expand All @@ -33,17 +32,19 @@ the user app library, if the Bench app library is outdated.
* [See Also](#see-also)

## Just give me the latest and greatest {#bench-upgrade}
If you just want to upgrade all apps to the latest versions known to Bench,
[upgrade the whole Bench system](/tutorial/upgrade).
If you want to upgrade individual apps read the following sections.
Make sure no apps from the Bench environment are running.
Open the [Setup Window][] in the [Bench Dashboard][] and use the following menu entries:

1. _Setup_ &rarr; _Update App Libraries_
2. _Setup_ &rarr; _Upgrade Apps_

## Upgrade Default Apps without Version Number {#without-version}
This section describes how you can upgrade a [default app](/ref/app-types/#default),
which has no [Version](/ref/app-properties/#Version)
specified or has a version set to `latest`.

### Upgrading Comfortably {#without-version-dashboard}
Make shure the app in question is not running at this point.
Make sure the app in question is not running at this point.
Open the [Setup Window][] in the [Bench Dashboard][] and scroll in the
[App List][] to the app.
Right-click in its row to open the context menu and select _Upgrade_.
Expand All @@ -57,7 +58,7 @@ It just guarantees, that the installed version is the one,
currently available under the download URL of the app.

### Upgrading Manually {#without-version-manually}
Make shure the app in question is not running at this point.
Make sure the app in question is not running at this point.
Find the apps folder in the [`lib`](/ref/file-structure/#lib-dir)
directory and delete it with all its content.
Then find the apps resource in the download [`cache\apps`](/ref/file-structure/#cache-apps-dir)
Expand All @@ -82,7 +83,7 @@ Thereby, installing the highest version available and in the possibly
specified version range.

### Upgrading Comfortably {#packages-dashboard}
Make shure the app in question is not running at this point.
Make sure the app in question is not running at this point.
Open the [Setup Window][] in the [Bench Dashboard][] and scroll in the
[App List][] to the app.
Right-click in its row to open the context menu and select _Upgrade Package_.
Expand All @@ -100,20 +101,21 @@ Open your favorite [Bench shell][] (CMD, PowerShell, or Bash) and
call the responsible package manager with the appropriate arguments.

## Override an Apps Version {#override}
If an app is defined in the Bench app library with a fixed version number,
If an app is defined with a fixed version number,
you can try to change the version number by overriding it in your
user app library.
Checkout the app definition in the [Bench App Library](/ref/file-structure/#res-apps)
`res\apps.md` to figure out how the `Version` property is used for this particular app.
Checkout the app definition in the app library viewer
(_Bench Dashboard_ &rarr; _Documentation Button_ &rarr; _App Libraries_)
to figure out how the `Version` property is used for this particular app.

Open the [User App Library](/ref/file-structure/#config-apps) `config\apps.md`
in your favorite text editor and append a new section locking like this:

```md
### Name of the App

* `ID`: <AppID>
* `Version`: <X.Y.Z>
* ID: `<AppID>`
* Version: `<X.Y.Z>`
```

Replace `<AppID>` with the ID of the app you want to override,
Expand Down
Loading

0 comments on commit d70690e

Please sign in to comment.