-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
284 additions
and
105 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
Binary file renamed
BIN
+57.6 KB
...s/specwatchr.1.6.1/specwatchr.1.6.1.nupkg → ...s/specwatchr.1.6.4/specwatchr.1.6.4.nupkg
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ECHO ON | ||
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe sidekickapp.cs | ||
sidekickapp.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.IO; | ||
using System.Diagnostics; | ||
|
||
namespace SyncDeploy | ||
{ | ||
class Program | ||
{ | ||
static string path = null; | ||
static FileSystemWatcher watcher; | ||
|
||
static void Main(string[] args) | ||
{ | ||
path = Directory.GetCurrentDirectory(); | ||
watcher = new FileSystemWatcher(path, "*.*"); | ||
watcher.IncludeSubdirectories = true; | ||
watcher.EnableRaisingEvents = true; | ||
watcher.NotifyFilter = NotifyFilters.LastWrite; | ||
watcher.Changed += new FileSystemEventHandler(watcher_Changed); | ||
watcher.Created += new FileSystemEventHandler(watcher_Changed); | ||
Console.WriteLine("Watching " + path + " for changes, press Enter to stop..."); | ||
Shell("tutorial"); | ||
Console.ReadLine(); | ||
|
||
} | ||
|
||
static void Shell(params string[] args) | ||
{ | ||
ProcessStartInfo processStartInfo = new ProcessStartInfo("ruby", "dotnet.watchr.rb " + string.Join(" ", args)); | ||
processStartInfo.UseShellExecute = false; | ||
processStartInfo.ErrorDialog = false; | ||
processStartInfo.RedirectStandardError = true; | ||
processStartInfo.RedirectStandardInput = true; | ||
processStartInfo.RedirectStandardOutput = true; | ||
Process process = new Process(); | ||
process.StartInfo = processStartInfo; | ||
bool processStarted = process.Start(); | ||
|
||
StreamWriter inputWriter = process.StandardInput; | ||
StreamReader outputReader = process.StandardOutput; | ||
StreamReader errorReader = process.StandardError; | ||
process.WaitForExit(); | ||
System.Console.Write(outputReader.ReadToEnd()); | ||
System.Console.Write(errorReader.ReadToEnd()); | ||
} | ||
|
||
static void watcher_Changed(object sender, FileSystemEventArgs e) | ||
{ | ||
watcher.EnableRaisingEvents = false; | ||
var relativeFile = e.FullPath.Replace(Directory.GetCurrentDirectory(), ""); | ||
System.Console.WriteLine("Changed: " + relativeFile); | ||
Shell("file_changed", relativeFile); | ||
watcher.EnableRaisingEvents = true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
echo OFF | ||
echo ========================================================== | ||
echo ========================================================== | ||
echo The "watchr" command is deprecated. Just type: sidekick | ||
echo ========================================================== | ||
echo ========================================================== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
param($rootPath, $toolsPath, $package, $project) | ||
|
||
$configFileFrom = $toolsPath + "\..\src\dotnet.watchr.rb" | ||
$configFileTo = "dotnet.watchr.rb" | ||
|
||
$watchrFileFrom = $toolsPath + "\..\src\watcher_dot_net.rb" | ||
$watchrFileTo = "watcher_dot_net.rb" | ||
|
||
$redFileFrom = $toolsPath + "\..\src\red.png" | ||
$redFileTo = "red.png" | ||
|
||
$greenFileFrom = $toolsPath + "\..\src\green.png" | ||
$greenFileTo = "green.png" | ||
|
||
$sidekickbatFileFrom = $toolsPath + "\..\src\sidekick.bat" | ||
$sidekickbatFileTo = "sidekick.bat" | ||
|
||
$watchrbatFileFrom = $toolsPath + "\..\src\watchr.bat" | ||
$watchrbatFileTo = "watchr.bat" | ||
|
||
$sidekickcsFileFrom = $toolsPath + "\..\src\sidekickapp.cs" | ||
$sidekickcdFileTo = "sidekickapp.cs" | ||
|
||
if(!(Test-Path $configFileTo)) | ||
{ | ||
Copy-Item $configFileFrom $configFileTo | ||
Copy-Item $watchrFileFrom $watchrFileTo | ||
Copy-Item $redFileFrom $redFileTo | ||
Copy-Item $greenFileFrom $greenFileTo | ||
Copy-Item $sidekickcsFileFrom $sidekickcsFileTo | ||
Copy-Item $sidekickbatFileFrom $sidekickbatFileTo | ||
Copy-Item $watchrbatFileFrom $watchrbatFileTo | ||
} | ||
else | ||
{ | ||
Write-Host "" | ||
Write-Host "files were not copied to root directory, because it looks like they already exist, go to the package directory and copy all the files from " $toolsPath "\..\src to the root directory (unless you've changed them of course)" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ECHO ON | ||
C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe sidekickapp.cs | ||
sidekickapp.exe |
Oops, something went wrong.