-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DotnetCore Runtime: Use startup file name from build manifest file if…
… present (#72)
- Loading branch information
Showing
8 changed files
with
220 additions
and
32 deletions.
There are no files selected for viewing
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 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,36 @@ | ||
// -------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT license. | ||
// -------------------------------------------------------------------------------------------- | ||
|
||
package common | ||
|
||
import ( | ||
"github.com/BurntSushi/toml" | ||
"log" | ||
"path/filepath" | ||
) | ||
|
||
type BuildManifest struct { | ||
StartupFileName string | ||
} | ||
|
||
const ManifestFileName = "oryx-manifest.toml" | ||
|
||
func DeserializeBuildManifest(manifestFile string) BuildManifest { | ||
var manifest BuildManifest | ||
if _, err := toml.DecodeFile(manifestFile, &manifest); err != nil { | ||
log.Fatal(err) | ||
} | ||
return manifest | ||
} | ||
|
||
func GetBuildManifest(appPath string) BuildManifest { | ||
buildManifest := BuildManifest{} | ||
|
||
tomlFile := filepath.Join(appPath, ManifestFileName) | ||
if FileExists(tomlFile) { | ||
buildManifest = DeserializeBuildManifest(tomlFile) | ||
} | ||
return buildManifest | ||
} |
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 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
Oops, something went wrong.