ivanparvaresh / dotnet-exec Goto Github PK
View Code? Open in Web Editor NEWExecute shell script as dotnet tasks
License: MIT License
Execute shell script as dotnet tasks
License: MIT License
It would be great to run commands via just dotnet exec
too to save the fingers.
(Love the concept btw. Coming back to .NET after a while of node, I was looking for something like npm scripts)
As Developer, We need to pass extra arguments to the command
Acceptance Criteria
dotnet execute [command-name] params
needed to have .dotnetexec.json
empty file creator.
by using dotnet execute config-init
should create an empty configuration file
We currently have a set of .sh
bash scripts which we've tweaked to work fine on both linux environments directly and bash on Windows.
It seems entrypoint can either be explicit and platform specific (e.g. /bin/bash) or not specified, in which case it auto-detects.
However neither of these options allow us to use cross-platform bash scripts.
Perhaps the Windows default of cmd.exe
is a little presumptuous too, as I expect a large percentage of scripts on windows would be powershell (or bash). Also the defined scripts are written with a specific shell in mind, so running on different shells by default on different platforms, doesn't lend itself to cross-platform development.
Maybe rather than entrypoint
, the user could specify a shell
property, with values such as bash
, powershell
, cmd
, etc and how to invoke that shell would become an implementation detail, e.g. using git bash/cygwin on windows.
But I'm not sure what it's for. I just set mine to "."
.
Can it's purpose be documented and/or it made optional?
Story
User should be able to view all possible commands
Summary
by calling dotnet execute help
should list all available commands
Summary
Object reference not set to an instance of an object.
error on running an invalid command
There an error on Travis CI/CD:
Also, it should Publish to Nuget
only on Tag creation
I was hoping we'd be able to exec from any folder in the repo, but I only appear to be able to exec from the root of the repo, in the folder where the dotnetexec
file lives.
It would be great if it traversed up the directory tree looking for the file, like e.g. the dotnet-tools.json
itself.
I see the following entry:
"entrypoint": "/bin/bash",
Will this work in Windows? Powershell? Cmd.exe?
Suggestion: Add to https://github.com/natemcmaster/dotnet-tools
it's good to have an XML schema definition for .dotnetexec
Would be really nice. Just a little easier to read/maintain.
When trying to run dotnet execute test
with the following config:
{
"name": "app",
"env": {},
"commands": {
"build": [
"dotnet build"
],
"test": [
"dotnet test"
]
}
}
I get this error:
Could not execute because the specified command or file was not found.
Possible reasons for this include:
* You misspelled a built-in dotnet command.
* You intended to execute a .NET Core program, but dotnet-execute does not exist.
* You intended to run a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.
This is on Windows 10 (and I ran dotnet tool install --global dotnet-tool-exec
) before this
If I run our xunit tests sh script then I see a green results line in the output.
But running the same script via dotnet execute, all the text is white.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.