Nativescriptアプリケーションを構築するためのContinuous Integrationシステムを稼働させようとしています。ページthisノートを参照して、窓のPowerShellスクリプト:Visual Studio Team Services操作のPowershellで対話型ウィンドウステーションが必要
開始プロセス-FilePathたpowershell.exe -Verb RunAsの-wait -ArgumentList「-noprofile -ExecutionPolicyバイパス-Command IEX((新しいオブジェクトネット。 webclient).DownloadString( 'https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1')) "
は、nativescript環境を設定する必要があります。しかし、私はPowerShellのビルドステップでinline script
として、これを実行すると、ビルドはこの出力で失敗します。
Starting task: Powershell Script
******************************************************************************
. 'C:\Users\buildguest\AppData\Local\Temp\c0d7012a-0ed3-4dcd-976b-aa0ce6f6012b.ps1'
Executing the following powershell script. (workingFolder = C:\a\1\s)
C:\Users\buildguest\AppData\Local\Temp\c0d7012a-0ed3-4dcd-976b-aa0ce6f6012b.ps1
start-process : This command cannot be run due to the error: This operation requires an interactive window station.
At C:\Users\buildguest\AppData\Local\Temp\c0d7012a-0ed3-4dcd-976b-aa0ce6f6012b.ps1:1 char:1
+ start-process -FilePath PowerShell.exe -Verb Runas -Wait -ArgumentList "-NoProfi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
Process completed with exit code 0 and had 1 error(s) written to the error stream.
******************************************************************************
Finishing task: PowerShell
******************************************************************************
Task PowerShell failed. This caused the job to fail. Look at the logs for the task for more details.
私は、それがローカルマシンがGUIを持っている場合、スクリプトは実行のみ意味だと思いますか?リモートでホストされるビルドサーバーでは明らかにそうではありません。私の前提が正しければ、これを回避する方法や、GUI上の依存関係を取り除く方法がありますか?
更新:
Hereは、このスクリプトからのユーザーとの対話のすべてを削除する私の試みですが、私はまだ同じ結果を得る...
更新:
******************************************************************************
Starting task: Run C:\NPM\Modules\tns.cmd
******************************************************************************
Executing the following command-line. (workingFolder = C:\a\1\s)
C:\NPM\Modules\tns.cmd build android
Error message highlight pattern:
Warning message highlight pattern:
[31;1mNo project found at or above 'C:\a\1\s' and neither was a --path specified.[0m
# build android
ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
Γöé Usage Γöé Synopsis Γöé
Γöé General Γöé $ tns build android [--compileSdk <API Level>] [--key-store-path <File Path> --key-store-password <Password> --key-store-alias <Name> --key-store-alias-password <Password>] [--release] [--static-bindings] [--copy-to <File Path>] Γöé
ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
Builds the project for Android and produces an APK that you can manually deploy on device or in the native emulator.
### Options
* --compileSdk - Sets the Android SDK that will be used to build the project.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the --key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the --key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --static-bindings - This is an experimental feature. If set, generates static bindings from your JavaScript code to corresponding native Android APIs during build. This static bindings speed up app loading.**
* --copy-to - Specifies the file path where the built .apk will be copied. If it points to a non-existent directory, it will be created. If the specified value is directory, the original file name will be used.
** By default, NativeScript runtime for Android uses runtime binding generator. When you extend a Java class and overwrite a lot of methods, this could be a potentially slow operation.
### Attributes
<API Level> is a valid Android API level. For example: 22, 23.
Sending exception report (press Ctrl+C to stop).....
******************************************************************************
Finishing task: CmdLine
******************************************************************************
Task CmdLine failed. This caused the job to fail. Look at the logs for the task for more details.
******************************************************************************
注:repoに相対的なパスを使用する場合は、$(Build.SourcesDirectory)\を使用できます。
ありがとう!あなたは正しいと思われますが、NPMのステップを使ってnativescriptをインストールするとすぐに使えます –
「警告メッセージハイライトパターン: 」「tns build android」は内部コマンドまたは外部コマンドとして認識されません、 操作可能なプログラムまたはバッチファイル.'ネイティブスクリプトコマンドを使用しようとすると、どのようにtnsをパスに追加するか、コマンドプロンプトを再起動するなどtnsが認識されますか? –
@GeorgeEdwards 'C:\ NPM \ Modules \ tns'を実行可能なパスに入れて、' build android'をパラメータとして使用します。 –