From 19b4c2bd8abbb53baf3c55ec4110b5cde5151e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=B0smail=20=C3=87A=C4=9EDA=C5=9E?= Date: Wed, 16 Sep 2020 12:19:04 +0300 Subject: [PATCH] fix indentation of json files and docs --- abp-build-config.json | 2 +- docs/en/CLI-BuildCommand.md | 67 ++++++++++++++++++++++++++++++++++ docs/en/CLI.md | 72 +++---------------------------------- 3 files changed, 72 insertions(+), 69 deletions(-) create mode 100644 docs/en/CLI-BuildCommand.md diff --git a/abp-build-config.json b/abp-build-config.json index 9fa6025f07..8375fc4660 100644 --- a/abp-build-config.json +++ b/abp-build-config.json @@ -1,4 +1,4 @@ { "Name": "abp", - "RootPath": "D:\\GitHub\\abp" + "RootPath": "D:\\GitHub\\abp" } \ No newline at end of file diff --git a/docs/en/CLI-BuildCommand.md b/docs/en/CLI-BuildCommand.md new file mode 100644 index 0000000000..d9620aa621 --- /dev/null +++ b/docs/en/CLI-BuildCommand.md @@ -0,0 +1,67 @@ +# Build Command + +Building a .NET project is hard when the project references a project reference outside of the solution or even from a different GIT repository. This command builds a GIT repository and it's depending repositories or a single .NET solution File. In order ```build``` command to work, its **executing directory** or passed ```--working-directory``` parameter's directory must contain one of; + +* A .NET solution file (*.sln) +* abp-build-config.json + +When the executing directory (or ```--working-directory``` parameter's directory) contains a .NET solution file, ```build``` command builds all the projects in the related solution file and all project references on building project files recursively. + +When the executing directory (or ```--working-directory``` parameter's directory) contains a ```abp-build-config.json```, ```build``` command builds all changed projects form its last build and all project references on building project files recursively. + +# Build Command Config + +```abp-build-config.json``` contains properties below; + +* ```Name```: Name of the GIT repository. This can be friendly name of your GIT repository or any other unique string for the repository. +* ```RootPath```: Root path of the repository which contains ```.git``` folder. +* ```DependingRepositories```: Depending repository list of a repository. Each depending repository item contains same fields as a repository. +* ```IgnoredDirectories```: Relative directory paths to ignore while building a GIT repository. + +A sample ```abp-build-config.json``` looks like for a Windows OS; + +````json +{ + "Name": "main-repository", + "RootPath": "D:\\GitHub\\main-repository", + "DependingRepositories": [{ + "Name": "module-repository", + "RootPath": "D:\\GitHub\\module-repository" + }], + "IgnoredDirectories": [ + "utils" + ] +} +```` + +# Build Status + +ABP CLI stores a build status file for builds using the repository friendly names and current branch names in the; + +* ```%USERPROFILE%\.abp\build\``` for Windows. +* ```$HOME/.abp/build/``` for Linux/macOS. + +and uses this file when building same repository next time and only builds affected projects and decreases the total build time. A sample build status file content looks like; + +````json +{ + "RepositoryName": "main-repository", + "BranchName": "dev", + "CommitId": "84ecde8ba275aeeb14d24a87ad46a1e941adf8ba", + "SucceedProjects": [{ + "CsProjPath": "D:\\GitHub\\main-repository\\BookStore\\BookStore.Web.csproj", + "CommitId": "84ecde8ba275aeeb14d24a87ad46a1e941adf8ba" + }], + "DependingRepositories": [{ + "RepositoryName": "module-repository", + "BranchName": "dev", + "CommitId": "0598b8e45af9507fc9ba8abf304e78fc7d434e04", + "SucceedProjects": [{ + "CsProjPath": "D:\\GitHub\\module-repository\\identity-module\Identity\\Identity.Web.csproj", + "CommitId": "0598b8e45af9507fc9ba8abf304e78fc7d434e04" + }], + "DependingRepositories": [] + }] +} +```` + diff --git a/docs/en/CLI.md b/docs/en/CLI.md index 5c9e964414..61474a7095 100644 --- a/docs/en/CLI.md +++ b/docs/en/CLI.md @@ -363,77 +363,11 @@ abp logout ### build -Building a .NET project is hard when the project references a project reference outside of the solution or even from a different GIT repository. This command builds a GIT repository and it's depending repositories or a single .NET solution File. In order ```build``` command to work, it must be executed in a directory which contains one of; +This command builds a GIT repository and it's depending repositories or a single .NET solution File. In order ```build``` command to work, its **executing directory** or passed ```--working-directory``` parameter's directory must contain one of; * A .NET solution file (*.sln) * abp-build-config.json -When the executing directory contains a .NET solution file, ```build``` command builds all the projects in the related solution file and all project references on building project files recursively. - -When the executing directory contains a ```abp-build-config.json```, ```build``` command builds all changed projects form its last build and all project references on building project files recursively. - -```abp-build-config.json``` contains properties below; - -* ```Name```: Name of the GIT repository. This can be friendly name of your GIT repository or any other unique string for the repository. -* ```RootPath```: Root path of the repository which contains ```.git``` folder. -* ```DependingRepositories```: Depending repository list of a repository. Each depending repository item contains same fields as a repository. -* ```IgnoredDirectories```: Relative directory paths to ignore while building a GIT repository. - -A sample ```abp-build-config.json``` looks like for a Windows OS; - -````json -{ - "Name": "main-repository", - "RootPath": "D:\\GitHub\\main-repository", - "DependingRepositories": [{ - "Name": "module-repository", - "RootPath": "D:\\GitHub\\module-repository" - }], - "IgnoredDirectories": [ - "utils" - ] -} -```` - -ABP CLI stores a build status file for builds using the repository friendly names and current branch names in the; - -* ```%USERPROFILE%\.abp\build\``` for Windows. -* ```$HOME/.abp/build/``` for Linux/macOS. - -and uses this file when building same repository next time and only builds affected projects and decreases the total build time. A sample build status file content looks like; - -````json -{ - "RepositoryName": "main-repository", - "BranchName": "dev", - "CommitId": "84ecde8ba275aeeb14d24a87ad46a1e941adf8ba", - "SucceedProjects": [ - { - "CsProjPath": "D:\\GitHub\\main-repository\\BookStore\\BookStore.Web.csproj", - "CommitId": "84ecde8ba275aeeb14d24a87ad46a1e941adf8ba" - } - ], - "DependingRepositories": [ - { - "RepositoryName": "module-repository", - "BranchName": "dev", - "CommitId": "0598b8e45af9507fc9ba8abf304e78fc7d434e04", - "SucceedProjects": [ - { - "CsProjPath": "D:\\GitHub\\module-repository\\identity-module\Identity\\Identity.Web.csproj", - "CommitId": "0598b8e45af9507fc9ba8abf304e78fc7d434e04" - } - ], - "DependingRepositories": [] - } - ] -} -```` - -When building a single .NET solution file, its belonging GIT repository is used to generate this file. - -After each build, this status file is updated with latest build information. - Usage: ````bash @@ -445,5 +379,7 @@ abp build [options] * ```--working-directory``` or ```-w```: Specifies the working directory. This option is useful when the command is executed outside of a GIT repository or when executing directory doesn't contain a .NET solution file. * ```--build-name``` or ```-n```: Specifies a name for the build. This option is useful when same repository is used for more than one different builds. * ```--dotnet-build-arguments``` or ```-a```: Arguments to pass ```dotnet build``` when building project files. -* ```--force```: Forces to build projects even they are not changed from the last successful build. +* ```--force``` or ```-f```: Forces to build projects even they are not changed from the last successful build. + +For more details, see [build command documentation](CLI-BuildCommand.md).