Comments (6)
Oh, it's because you have a non-standard layout
I actually check whether sample Nake runner files are present in solution root or not (https://github.com/yevhen/Nake/blob/master/Build/NuGet/Init.ps1#L7). But you solution file and nake runner files are not on the same level.
Well, I prefer to leave this logic. It's really convenient when you're installing Nake first time, the runner file and sample script will be automatically created. Easy to boot novices.
Have any other ideas how can we fix this?
from nake.
It's pretty standard layout, especially for enterprise projects :), where source code is just a part of it. On the source level we have things like database, documentation, etc. So Nake is at root directory as it deals not only with source code, while solution file in src
.
Probably the right way of handling it is to utilize install.ps1 script - in that case it will run only once, after first install.
But I'd rather prefer a dirty hack, that would solve my problem, and seems to not harm others. Just adding one more check :)
$scriptDir = split-path $script:MyInvocation.MyCommand.Path
$solutionDir = (get-item $scriptDir ).parent.parent.parent.FullName
$mightBeRootDir = (get-item $solutionDir ).parent.FullName
$samplesDir = Join-Path (get-item $scriptDir ).parent.FullName "sample"
$sampleCsxFile = "Nake.csx"
$sampleBatFile = "Nake.bat"
if ((Test-Path "$mightBeRootDir\Nake.csx") -or (Test-Path "$mightBeRootDir\Nake.bat")) {
Exit
}
if ((Test-Path "$solutionDir\Nake.csx") -or (Test-Path "$solutionDir\Nake.bat")) {
Exit
}
Write-Host "Copying sample script and runner to root folder ..." -ForegroundColor DarkYellow
Copy-Item "$samplesDir\$sampleCsxFile" $rootDir
Copy-Item "$samplesDir\$sampleBatFile" $rootDir
But it smells.
from nake.
I'm more inclined to go with Install.ps1 since Nake will be installed only once for solution.
But I need to test it. Will have a look after Easter!
Happy Easter, btw! :)
from nake.
from nake.
Install.ps1 won't run for solution-level packages :(
Including sample script and batch runner as content - make it project-level :(
Another solution could be is to put Readme.txt with instructions ...
from nake.
Closing issue as it was fixed a long time ago in 2d2f5c7 by using simple readme instead of Install.ps1
. Thanks!
from nake.
Related Issues (20)
- how to debug a nake script (csx file) in visual studio HOT 4
- Spaces in directory confuses params passed to MSBuild HOT 3
- Stepping back from this project - help wanted HOT 1
- Nested tasks cli invocation syntax
- Typo in README.md HOT 1
- Fix wiki documentation for Shell HOT 5
- Wiki documentation for environment variable interpolation
- Document VSCode intellisense and debugging
- Multi-level caching
- Sample script scaffolding
- Include some batteries
- Align default imports and namespaces with dotnet-script
- Print task argument documentation to console
- Patch assemblies with build version
- Caching doesn't work properly for multi-file scripts
- Automatic quotation of interpolations
- Empty Nake.csx fails to run with 3.0.0-beta-02 due to NuGet resolution errors HOT 4
- Any updates ? HOT 11
- [Discussion] Cmd() vs Run() vs await $"" HOT 1
- Update to .NET 7 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nake.