You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2020/10/06 17:46:51 UTC
[GitHub] [lucenenet] NightOwl888 opened a new issue #364: Task: Make cross-OS build script
NightOwl888 opened a new issue #364:
URL: https://github.com/apache/lucenenet/issues/364
We currently have a `.bat` script file to launch the build from the command line that wraps a Powershell file. Clearly, since `.bat` is Windows-only, we will need to make a `.sh` script file in order to be able to build on other operating systems.
The [actual `build.bat` file](https://github.com/apache/lucenenet/blob/f0930a5f8df377cccc428dcfeba02ea4098a6dee/build.bat) does nothing more than read command line parameters (in any order they are entered), setting defaults where appropriate, and then launch Powershell with the PSake module.
While we could provide instructions to launch the Powershell script using when not running on Windows, the command structure would be simpler for end users if they had a similar `build.sh` wrapper script with the same inputs as the `build.bat` file (and if it is possible to use the `.sh` file on Windows, simply eliminate the `.bat` file).
Note that the `build.ps` script also [generates a replacement `build.bat` file](https://github.com/apache/lucenenet/blob/f0930a5f8df377cccc428dcfeba02ea4098a6dee/build/build.ps1#L583-L663) that eliminates the `version` and `packageVersion` parameters when building a release. This ensures a [release distribution](https://lucenenet.apache.org/download/download.html)'s `build.bat` file will always build the current release version unless the user manually updates the `version.props` file that is also in the release distribution. `build.ps` will need to be updated to generate a `build.sh` file during a release for the same reasons.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 closed issue #364: Task: Make cross-OS build script
Posted by GitBox <gi...@apache.org>.
NightOwl888 closed issue #364:
URL: https://github.com/apache/lucenenet/issues/364
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@lucenenet.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 commented on issue #364: Task: Make cross-OS build script
Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on issue #364:
URL: https://github.com/apache/lucenenet/issues/364#issuecomment-786784661
@miiitch
Yes, to my knowledge running the [`build.ps1`](https://github.com/apache/lucenenet/tree/0dbda3e18c7b69bd6beecd8e47d288c00d5d5440/build) file using Powershell core should work fine. But that script is not well documented, the commands to call it are more verbose, and the parameters vs properties to pass are a bit confusing to use and prone to change over time.
## Call to build.ps1 directly to run tests on Powershell core
```powershell
pwsh -ExecutionPolicy Bypass -Command "& { Import-Module ./build/psake.psm1; Invoke-Psake ./build/build.ps1 Build,Test -properties @{configuration='Release';maximumParalellJobs=10} -parameters @{ packageVersion='4.8.0-beta00013' } }"
```
[`build.bat` is documented on the README](https://github.com/apache/lucenenet#execution) and requires simpler syntax to use than running `build.ps1`. Ideally, we would just be able to type `build` on any OS in the [release distribution](https://lucenenet.apache.org/download/download.html) to build the source from scratch and `build -t` to run the tests. This currently only works on Windows.
## Same command using build.bat
```
build -t -mp 10 -pv:4.8.0-beta00013
```
> Running the command on a clone of the repo requires `PackageVersion` argument to be supplied. The release distribution doesn't accept a `PackageVersion` parameter and only builds a specific version that is defined in the `Version.proj` file of the release.
This issue is mainly about usability, not functionality.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] Shazwazza commented on issue #364: Task: Make cross-OS build script
Posted by GitBox <gi...@apache.org>.
Shazwazza commented on issue #364:
URL: https://github.com/apache/lucenenet/issues/364#issuecomment-704682065
_On a side note - the docs building process will need to remain as windows only for now just because docfx 2 is a netframework project._
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 edited a comment on issue #364: Task: Make cross-OS build script
Posted by GitBox <gi...@apache.org>.
NightOwl888 edited a comment on issue #364:
URL: https://github.com/apache/lucenenet/issues/364#issuecomment-786784661
@miiitch
Yes, to my knowledge running the [`build.ps1`](https://github.com/apache/lucenenet/tree/0dbda3e18c7b69bd6beecd8e47d288c00d5d5440/build) file using Powershell core should work fine. But that script is not well documented, the commands to call it are more verbose, and the parameters vs properties to pass are a bit confusing to use and prone to change over time.
## Call to build.ps1 directly to run tests on Powershell core
```powershell
pwsh -ExecutionPolicy Bypass -Command "& { Import-Module ./build/psake.psm1; Invoke-Psake ./build/build.ps1 Build,Test -properties @{ configuration='Release';maximumParalellJobs=10 } -parameters @{ packageVersion='4.8.0-beta00013' } }"
```
[`build.bat` is documented on the README](https://github.com/apache/lucenenet#execution) and requires simpler syntax to use than running `build.ps1`. Ideally, we would just be able to type `build` on any OS in the [release distribution](https://lucenenet.apache.org/download/download.html) to build the source from scratch and `build -t` to run the tests. This currently only works on Windows.
## Same command using build.bat
```
build -t -config:Release -mp 10 -pv:4.8.0-beta00013
```
> Running the command on a clone of the repo requires `PackageVersion` argument to be supplied. The release distribution doesn't accept a `PackageVersion` parameter and only builds a specific version that is defined in the `Version.proj` file of the release.
This issue is mainly about usability, not functionality.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] NightOwl888 edited a comment on issue #364: Task: Make cross-OS build script
Posted by GitBox <gi...@apache.org>.
NightOwl888 edited a comment on issue #364:
URL: https://github.com/apache/lucenenet/issues/364#issuecomment-786784661
@miiitch
Yes, to my knowledge running the [`build.ps1`](https://github.com/apache/lucenenet/tree/0dbda3e18c7b69bd6beecd8e47d288c00d5d5440/build) file using Powershell core should work fine. But that script is not well documented, the commands to call it are more verbose, and the parameters vs properties to pass are a bit confusing to use and prone to change over time.
## Call to build.ps1 directly to run tests on Powershell core
```powershell
pwsh -ExecutionPolicy Bypass -Command "& { Import-Module ./build/psake.psm1; Invoke-Psake ./build/build.ps1 Build,Test -properties @{ configuration='Release';maximumParalellJobs=10 } -parameters @{ packageVersion='4.8.0-beta00013' } }"
```
[`build.bat` is documented on the README](https://github.com/apache/lucenenet#execution) and requires simpler syntax to use than running `build.ps1`. Ideally, we would just be able to type `build` on any OS in the [release distribution](https://lucenenet.apache.org/download/download.html) to build the source from scratch and `build -t` to run the tests. This currently only works on Windows.
## Same command using build.bat
```
build -t -mp 10 -pv:4.8.0-beta00013
```
> Running the command on a clone of the repo requires `PackageVersion` argument to be supplied. The release distribution doesn't accept a `PackageVersion` parameter and only builds a specific version that is defined in the `Version.proj` file of the release.
This issue is mainly about usability, not functionality.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [lucenenet] miiitch commented on issue #364: Task: Make cross-OS build script
Posted by GitBox <gi...@apache.org>.
miiitch commented on issue #364:
URL: https://github.com/apache/lucenenet/issues/364#issuecomment-786656489
Hi, I working on build process on Linux boxes. powershell core works fine on it. Have you considered running powershell core for non windows build? There are limitations that I'm not aware of maybe.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org