Merge pull request #400 from piotrpMSFT/piotrpMSFT/issue374/dotnet-new

dotnet-init --> dotnet new
This commit is contained in:
Piotr Puszkiewicz 2015-12-08 21:48:16 -08:00
commit 1a26013455
13 changed files with 21 additions and 18 deletions

View file

@ -55,11 +55,12 @@ Make sure to use the System.CommandLine parser so behavior is consistant across
Each command's project root should contain a manpage-style Readme.md that describes the usage of the command. See other commands for reference. Each command's project root should contain a manpage-style Readme.md that describes the usage of the command. See other commands for reference.
#### Add project to build scripts #### Add project to build scripts
1. Add the project to /scripts/build/build-stage.ps1 1. Add the project to `/scripts/build/build-stage.ps1`
- Add the project name to the `$Projects` list - Add the project name to the `$Projects` list
2. Add the project to /scripts/build/build-stage.sh 2. Add the project to `/scripts/build/build-stage.sh`
- Add the project name to the `PROJECTS` list - Add the project name to the `PROJECTS` list
3. run *build* from the root directory and make sure your project is producing binaries in /artifacts/ 3. run *build* from the root directory and make sure your project is producing binaries in /artifacts/
#### Add command to packages #### Add command to packages
- Update the symlinks property of debian_config.json to include the new command - Update the `symlinks` property of `packaging/debian/debian_config.json` to include the new command
- Update the `$Projects` property in `packaging/osx/scripts/postinstall`

View file

@ -1,3 +1,3 @@
{ {
"projects": ["src", "test"] "projects": [ "src", "test" ],
} }

View file

@ -38,7 +38,7 @@
"bin/dotnet-compile" : "usr/bin/dotnet-compile", "bin/dotnet-compile" : "usr/bin/dotnet-compile",
"bin/dotnet-compile-csc" : "usr/bin/dotnet-compile-csc", "bin/dotnet-compile-csc" : "usr/bin/dotnet-compile-csc",
"bin/dotnet-compile-native" : "/usr/bin/dotnet-compile-native", "bin/dotnet-compile-native" : "/usr/bin/dotnet-compile-native",
"bin/dotnet-init":"usr/bin/dotnet-init", "bin/dotnet-init":"usr/bin/dotnet-new",
"bin/dotnet-publish" : "usr/bin/dotnet-publish", "bin/dotnet-publish" : "usr/bin/dotnet-publish",
"bin/dotnet-repl" : "usr/bin/dotnet-repl", "bin/dotnet-repl" : "usr/bin/dotnet-repl",
"bin/dotnet-repl-csi" : "usr/bin/dotnet-repl-csi", "bin/dotnet-repl-csi" : "usr/bin/dotnet-repl-csi",

View file

@ -7,11 +7,14 @@
ln -s $2/bin/dotnet /usr/local/bin/ ln -s $2/bin/dotnet /usr/local/bin/
ln -s $2/bin/dotnet-compile /usr/local/bin/ ln -s $2/bin/dotnet-compile /usr/local/bin/
ln -s $2/bin/dotnet-compile-csc /usr/local/bin/ ln -s $2/bin/dotnet-compile-csc /usr/local/bin/
ln -s $2/bin/dotnet-new /usr/local/bin/
ln -s $2/bin/dotnet-pack /usr/local/bin/
ln -s $2/bin/dotnet-publish /usr/local/bin/ ln -s $2/bin/dotnet-publish /usr/local/bin/
ln -s $2/bin/dotnet-repl /usr/local/bin/
ln -s $2/bin/dotnet-restore /usr/local/bin/ ln -s $2/bin/dotnet-restore /usr/local/bin/
ln -s $2/bin/dotnet-restore /usr/local/bin/
ln -s $2/bin/dotnet-init /usr/local/bin/
ln -s $2/bin/dotnet-resgen /usr/local/bin/ ln -s $2/bin/dotnet-resgen /usr/local/bin/
ln -s $2/bin/dotnet-run /usr/local/bin/
ln -s $2/bin/dotnet-test /usr/local/bin/
# A temporary solution to unblock dotnet compile # A temporary solution to unblock dotnet compile
cp $2/bin/corehost /usr/local/bin/ cp $2/bin/corehost /usr/local/bin/

View file

@ -16,7 +16,7 @@ $Projects = @(
"Microsoft.DotNet.Tools.Compiler", "Microsoft.DotNet.Tools.Compiler",
"Microsoft.DotNet.Tools.Compiler.Csc", "Microsoft.DotNet.Tools.Compiler.Csc",
"Microsoft.DotNet.Tools.Compiler.Native", "Microsoft.DotNet.Tools.Compiler.Native",
"Microsoft.DotNet.Tools.Init", "Microsoft.DotNet.Tools.New",
"Microsoft.DotNet.Tools.Pack", "Microsoft.DotNet.Tools.Pack",
"Microsoft.DotNet.Tools.Publish", "Microsoft.DotNet.Tools.Publish",
"Microsoft.DotNet.Tools.Repl", "Microsoft.DotNet.Tools.Repl",

View file

@ -28,7 +28,7 @@ PROJECTS=( \
Microsoft.DotNet.Tools.Compiler \ Microsoft.DotNet.Tools.Compiler \
Microsoft.DotNet.Tools.Compiler.Csc \ Microsoft.DotNet.Tools.Compiler.Csc \
Microsoft.DotNet.Tools.Compiler.Native \ Microsoft.DotNet.Tools.Compiler.Native \
Microsoft.DotNet.Tools.Init \ Microsoft.DotNet.Tools.New \
Microsoft.DotNet.Tools.Pack \ Microsoft.DotNet.Tools.Pack \
Microsoft.DotNet.Tools.Publish \ Microsoft.DotNet.Tools.Publish \
Microsoft.DotNet.Tools.Repl \ Microsoft.DotNet.Tools.Repl \

View file

@ -22,7 +22,7 @@ Common Options (passed before the command):
-v|--verbose Enable verbose output -v|--verbose Enable verbose output
Common Commands: Common Commands:
init Initialize a basic .NET project new Initialize a basic .NET project
restore Restore dependencies specified in the .NET project restore Restore dependencies specified in the .NET project
compile Compiles a .NET project compile Compiles a .NET project
publish Publishes a .NET project for deployment (including the runtime) publish Publishes a .NET project for deployment (including the runtime)

View file

@ -7,11 +7,10 @@
<Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" /> <Import Project="$(VSToolsPath)\DNX\Microsoft.DNX.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<ProjectGuid>bc765fbf-ad7a-4a99-9902-5540c5a74181</ProjectGuid> <ProjectGuid>bc765fbf-ad7a-4a99-9902-5540c5a74181</ProjectGuid>
<RootNamespace>Microsoft.DotNet.Tools.Init</RootNamespace> <RootNamespace>Microsoft.DotNet.Tools.New</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath> <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath> <OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\$(MSBuildProjectName)\</OutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
</PropertyGroup> </PropertyGroup>

View file

@ -7,7 +7,7 @@ using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace Microsoft.DotNet.Tools.Init namespace Microsoft.DotNet.Tools.New
{ {
public class Program public class Program
{ {
@ -72,13 +72,13 @@ namespace Microsoft.DotNet.Tools.Init
DebugHelper.HandleDebugSwitch(ref args); DebugHelper.HandleDebugSwitch(ref args);
var app = new CommandLineApplication(); var app = new CommandLineApplication();
app.Name = "dotnet init"; app.Name = "dotnet new";
app.FullName = ".NET Initializer"; app.FullName = ".NET Initializer";
app.Description = "Initializes empty project for .NET Platform"; app.Description = "Initializes empty project for .NET Platform";
app.HelpOption("-h|--help"); app.HelpOption("-h|--help");
var dotnetInit = new Program(); var dotnetNew = new Program();
app.OnExecute((Func<int>)dotnetInit.CreateEmptyProject); app.OnExecute(() => dotnetNew.CreateEmptyProject());
try try
{ {

View file

@ -1,5 +1,5 @@
{ {
"name": "dotnet-init", "name": "dotnet-new",
"version": "1.0.0-*", "version": "1.0.0-*",
"compilationOptions": { "compilationOptions": {
"emitEntryPoint": true "emitEntryPoint": true

View file

@ -115,7 +115,7 @@ namespace ConsoleApplication
Directory.SetCurrentDirectory(TestDirectory); Directory.SetCurrentDirectory(TestDirectory);
TestRunCommand("dotnet", "init"); TestRunCommand("dotnet", "new");
TestRunCommand("dotnet", "restore --quiet"); TestRunCommand("dotnet", "restore --quiet");
} }