Initial build scripts with empty functions for building the repo
This commit is contained in:
parent
1056577f02
commit
79a89f8b8b
6 changed files with 130 additions and 1 deletions
59
build.sh
59
build.sh
|
@ -1,3 +1,60 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Build Script
|
||||
# Currently Intended to build on ubuntu14.04
|
||||
|
||||
./scripts/bootstrap
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
REPO_ROOT=$DIR
|
||||
|
||||
OUTPUT_DIR="$REPO_ROOT/bin"
|
||||
PACKAGE_LAYOUT_DIR="$OUTPUT_DIR/package_layout"
|
||||
PACKAGE_OUTPUT_DIR="$OUTPUT_DIR/package_output"
|
||||
REPO_BINARIES_DIR="$REPO_ROOT/artifacts/ubuntu.14.04-x64"
|
||||
|
||||
execute(){
|
||||
build_repo
|
||||
create_empty_debian_layout
|
||||
copy_files_to_debian_layout
|
||||
create_debian_package
|
||||
}
|
||||
|
||||
acquire_previous_version(){
|
||||
|
||||
}
|
||||
|
||||
build_repo(){
|
||||
|
||||
}
|
||||
|
||||
create_empty_debian_layout(){
|
||||
rm -rf $PACKAGE_LAYOUT_DIR
|
||||
mkdir -p $PACKAGE_LAYOUT_DIR
|
||||
|
||||
mkdir "$PACKAGE_LAYOUT_DIR/\$"
|
||||
mkdir "$PACKAGE_LAYOUT_DIR/package_root"
|
||||
mkdir "$PACKAGE_LAYOUT_DIR/samples"
|
||||
mkdir "$PACKAGE_LAYOUT_DIR/docs"
|
||||
}
|
||||
|
||||
copy_files_to_debian_layout(){
|
||||
# Copy Built Binaries
|
||||
cp -a "$REPO_BINARIES_DIR/." "$PACKAGE_LAYOUT_DIR/package_root"
|
||||
|
||||
# Copy config file
|
||||
cp "$REPO_ROOT/debian_config.json" "$PACKAGE_LAYOUT_DIR"
|
||||
|
||||
# Copy Wrapper Scripts
|
||||
# TODO: This is a workaround for https://github.com/dotnet/coreclr/issues/1774
|
||||
cp "$REPO_ROOT/wrappers/." "PACKAGE_LAYOUT_DIR/package_root"
|
||||
}
|
||||
|
||||
create_debian_package(){
|
||||
$DIR/package_tool/package_tool $PACKAGE_LAYOUT_DIR $PACKAGE_OUTPUT_DIR
|
||||
}
|
35
debian_config.json
Normal file
35
debian_config.json
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"maintainer_name":"Microsoft",
|
||||
"maintainer_email": "dotnetcore@microsoft.com",
|
||||
|
||||
"package_name": "dotnet",
|
||||
|
||||
"short_description": "debian package for dotnet cli",
|
||||
"long_description": "This package restores, compiles, and publishes.",
|
||||
"homepage": "https://dotnet.github.io/core",
|
||||
|
||||
"release":{
|
||||
"package_version":"0.1",
|
||||
"package_revision":"1",
|
||||
"urgency" : "low",
|
||||
"changelog_message" : "Initial package"
|
||||
},
|
||||
|
||||
"control": {
|
||||
"priority":"standard",
|
||||
"section":"devel",
|
||||
"architecture":"any"
|
||||
},
|
||||
|
||||
"copyright": "2015 Microsoft",
|
||||
"license": {
|
||||
"type": "MIT",
|
||||
"full_text": "Copyright (c) 2015 Microsoft\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."
|
||||
},
|
||||
|
||||
"symlinks": {
|
||||
"dotnet.sh" : "usr/bin/dotnet",
|
||||
"dotnet-compile.sh" : "usr/bin/dotnet-compile",
|
||||
"dotnet-publish.sh" : "usr/bin/dotnet-publish"
|
||||
}
|
||||
}
|
4
wrappers/README.md
Normal file
4
wrappers/README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
## Wrapper Scripts
|
||||
|
||||
Used as a temporary workaround for a [coreconsole issue](https://github.com/dotnet/coreclr/issues/1774)
|
||||
|
11
wrappers/dotnet-compile.sh
Normal file
11
wrappers/dotnet-compile.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
exec "$DIR/dotnet-compile" "$@"
|
11
wrappers/dotnet-publish.sh
Normal file
11
wrappers/dotnet-publish.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
exec "$DIR/dotnet-publish" "$@"
|
11
wrappers/dotnet.sh
Normal file
11
wrappers/dotnet.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
SOURCE="$(readlink "$SOURCE")"
|
||||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
|
||||
done
|
||||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
|
||||
|
||||
exec "$DIR/dotnet" "$@"
|
Loading…
Reference in a new issue