Skip to content

Commit

Permalink
Reformat all BUCK and .bzl files
Browse files Browse the repository at this point in the history
By invoking the bazel `buildifier` tool on them. These
files are all written using the StarLark language used
in bazel, and so this should be a safe operation.

Future changes to build files should also be formatted
this way in order to keep consistency and minimise the
diffs submitted when working on build files.
  • Loading branch information
shs96c committed Feb 11, 2019
1 parent 6738b44 commit 29a4201
Show file tree
Hide file tree
Showing 169 changed files with 4,347 additions and 4,262 deletions.
16 changes: 8 additions & 8 deletions BUCK
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
export_file(
name = 'notice',
out = 'NOTICE',
src = 'NOTICE',
visibility = [ 'PUBLIC' ],
name = "notice",
out = "NOTICE",
src = "NOTICE",
visibility = ["PUBLIC"],
)

export_file(
name = 'license',
out = 'LICENSE',
src = 'LICENSE',
visibility = [ 'PUBLIC' ],
name = "license",
out = "LICENSE",
src = "LICENSE",
visibility = ["PUBLIC"],
)
29 changes: 14 additions & 15 deletions cpp/prebuilt/BUCK
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
export_file(
name = 'noblur32',
out = 'i386/x_ignore_nofocus.so',
src = 'i386/libnoblur.so',
visibility = [
'//dotnet/src/webdriver:webdriver_deps',
'//java/client/src/org/openqa/selenium/firefox/xpi:i386',
],
name = "noblur32",
out = "i386/x_ignore_nofocus.so",
src = "i386/libnoblur.so",
visibility = [
"//dotnet/src/webdriver:webdriver_deps",
"//java/client/src/org/openqa/selenium/firefox/xpi:i386",
],
)

export_file(
name = 'noblur64',
out = 'amd64/x_ignore_nofocus.so',
src = 'amd64/libnoblur64.so',
visibility = [
'//dotnet/src/webdriver:webdriver_deps',
'//java/client/src/org/openqa/selenium/firefox/xpi:amd64',
],
name = "noblur64",
out = "amd64/x_ignore_nofocus.so",
src = "amd64/libnoblur64.so",
visibility = [
"//dotnet/src/webdriver:webdriver_deps",
"//java/client/src/org/openqa/selenium/firefox/xpi:amd64",
],
)

36 changes: 18 additions & 18 deletions dotnet/BUCK
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
load("//dotnet:selenium-dotnet-version.bzl", "SE_VERSION")

export_file(
name = 'keyfile',
src = 'WebDriver.snk',
out = 'WebDriver.snk',
visibility = ['PUBLIC']
name = "keyfile",
src = "WebDriver.snk",
out = "WebDriver.snk",
visibility = ["PUBLIC"],
)

zip_file(
name = 'release',
srcs = [
'//dotnet/src/webdriver:pack',
'//dotnet/src/webdriverbackedselenium:pack',
'//dotnet/src/support:pack'
],
out = "selenium-dotnet-{}.zip".format(SE_VERSION)
name = "release",
srcs = [
"//dotnet/src/webdriver:pack",
"//dotnet/src/webdriverbackedselenium:pack",
"//dotnet/src/support:pack",
],
out = "selenium-dotnet-{}.zip".format(SE_VERSION),
)

zip_file(
name = 'release_strongnamed',
srcs = [
'//dotnet/src/webdriver:pack_strongnamed',
'//dotnet/src/webdriverbackedselenium:pack_strongnamed',
'//dotnet/src/support:pack_strongnamed'
],
out = "selenium-dotnet-strongnamed-{}.zip".format(SE_VERSION)
name = "release_strongnamed",
srcs = [
"//dotnet/src/webdriver:pack_strongnamed",
"//dotnet/src/webdriverbackedselenium:pack_strongnamed",
"//dotnet/src/support:pack_strongnamed",
],
out = "selenium-dotnet-strongnamed-{}.zip".format(SE_VERSION),
)
178 changes: 89 additions & 89 deletions dotnet/src/support/BUCK
Original file line number Diff line number Diff line change
@@ -1,126 +1,126 @@
load("//dotnet:selenium-dotnet-version.bzl", "SE_VERSION", "ASSEMBLY_VERSION")
load("//dotnet:selenium-dotnet-version.bzl", "ASSEMBLY_VERSION", "SE_VERSION")

genrule(
name = 'net35',
srcs = [ 'WebDriver.Support.csproj' ],
bash = "echo '$(location //dotnet/src/webdriver:net35)' && dotnet build $SRCS --configuration Release --framework net35 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:net35)' && dotnet build %SRCS% --configuration Release --framework net35 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "net35",
srcs = ["WebDriver.Support.csproj"],
bash = "echo '$(location //dotnet/src/webdriver:net35)' && dotnet build $SRCS --configuration Release --framework net35 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:net35)' && dotnet build %SRCS% --configuration Release --framework net35 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'net40',
srcs = [ 'WebDriver.Support.csproj' ],
bash = "echo '$(location //dotnet/src/webdriver:net40)' && dotnet build $SRCS --configuration Release --framework net40 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:net40)' && dotnet build %SRCS% --configuration Release --framework net40 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "net40",
srcs = ["WebDriver.Support.csproj"],
bash = "echo '$(location //dotnet/src/webdriver:net40)' && dotnet build $SRCS --configuration Release --framework net40 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:net40)' && dotnet build %SRCS% --configuration Release --framework net40 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'net45',
srcs = [ 'WebDriver.Support.csproj' ],
bash = "echo '$(location //dotnet/src/webdriver:net45)' && dotnet build $SRCS --configuration Release --framework net45 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:net45)' && dotnet build %SRCS% --configuration Release --framework net45 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "net45",
srcs = ["WebDriver.Support.csproj"],
bash = "echo '$(location //dotnet/src/webdriver:net45)' && dotnet build $SRCS --configuration Release --framework net45 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:net45)' && dotnet build %SRCS% --configuration Release --framework net45 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:FileVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'netstandard2.0',
srcs = [ 'WebDriver.Support.csproj' ],
bash = "echo '$(location //dotnet/src/webdriver:netstandard2.0)' && dotnet build $SRCS --configuration Release --framework netstandard2.0 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:netstandard2.0)' && dotnet build %SRCS% --configuration Release --framework netstandard2.0 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "netstandard2.0",
srcs = ["WebDriver.Support.csproj"],
bash = "echo '$(location //dotnet/src/webdriver:netstandard2.0)' && dotnet build $SRCS --configuration Release --framework netstandard2.0 --output $OUT /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=$OUT/../obj/ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
cmd_exe = "echo '$(location //dotnet/src/webdriver:netstandard2.0)' && dotnet build %SRCS% --configuration Release --framework netstandard2.0 --output %OUT% /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'merge',
srcs = [
':net35',
':net40',
':net45',
':netstandard2.0'
],
cmd_exe =
'setlocal EnableDelayedExpansion && ' +
'(if not exist %OUT% mkdir %OUT%) && ' +
'for %%G in (%SRCS%) do (' +
'set target_dir=%%G&& ' +
'set platform_dir=%%G\\..&& ' +
'for %%H in (!target_dir!) do (' +
'for %%I in (!platform_dir!) do set platform_moniker=%%~nxI&& ' +
'(if not exist %OUT%\\!platform_moniker! mkdir %OUT%\\!platform_moniker!) && ' +
'copy !target_dir!\\WebDriver.Support.dll %OUT%\\!platform_moniker! &&' +
'copy !target_dir!\\WebDriver.Support.xml %OUT%\\!platform_moniker!' +
')' +
')',
out = 'lib'
name = "merge",
srcs = [
":net35",
":net40",
":net45",
":netstandard2.0",
],
cmd_exe =
"setlocal EnableDelayedExpansion && " +
"(if not exist %OUT% mkdir %OUT%) && " +
"for %%G in (%SRCS%) do (" +
"set target_dir=%%G&& " +
"set platform_dir=%%G\..&& " +
"for %%H in (!target_dir!) do (" +
"for %%I in (!platform_dir!) do set platform_moniker=%%~nxI&& " +
"(if not exist %OUT%\!platform_moniker! mkdir %OUT%\!platform_moniker!) && " +
"copy !target_dir!\WebDriver.Support.dll %OUT%\!platform_moniker! &&" +
"copy !target_dir!\WebDriver.Support.xml %OUT%\!platform_moniker!" +
")" +
")",
out = "lib",
)

genrule(
name = 'pack',
srcs = ['WebDriver.Support.nuspec'],
cmd_exe = "$(exe //third_party/dotnet/nuget:nuget) pack %SRCS% /Properties packageid=Selenium.Support;version={} /Version {} /BasePath $(location :merge) /OutputDirectory %OUT%".format(SE_VERSION, SE_VERSION),
out = 'dist',
visibility = [ 'PUBLIC' ]
name = "pack",
srcs = ["WebDriver.Support.nuspec"],
cmd_exe = "$(exe //third_party/dotnet/nuget:nuget) pack %SRCS% /Properties packageid=Selenium.Support;version={} /Version {} /BasePath $(location :merge) /OutputDirectory %OUT%".format(SE_VERSION, SE_VERSION),
out = "dist",
visibility = ["PUBLIC"],
)

genrule(
name = 'net35_strongnamed',
srcs = [ 'WebDriver.Support.csproj' ],
cmd = "echo '$(location //dotnet/src/webdriver:net35_strongnamed)' && dotnet build %SRCS% --configuration Release --framework net35 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "net35_strongnamed",
srcs = ["WebDriver.Support.csproj"],
cmd = "echo '$(location //dotnet/src/webdriver:net35_strongnamed)' && dotnet build %SRCS% --configuration Release --framework net35 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'net40_strongnamed',
srcs = [ 'WebDriver.Support.csproj' ],
cmd = "echo '$(location //dotnet/src/webdriver:net40_strongnamed)' && dotnet build %SRCS% --configuration Release --framework net40 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "net40_strongnamed",
srcs = ["WebDriver.Support.csproj"],
cmd = "echo '$(location //dotnet/src/webdriver:net40_strongnamed)' && dotnet build %SRCS% --configuration Release --framework net40 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'net45_strongnamed',
srcs = [ 'WebDriver.Support.csproj' ],
cmd = "echo '$(location //dotnet/src/webdriver:net45_strongnamed)' && dotnet build %SRCS% --configuration Release --framework net45 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "net45_strongnamed",
srcs = ["WebDriver.Support.csproj"],
cmd = "echo '$(location //dotnet/src/webdriver:net45_strongnamed)' && dotnet build %SRCS% --configuration Release --framework net45 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:AssemblyVersion={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'netstandard2.0_strongnamed',
srcs = [ 'WebDriver.Support.csproj' ],
cmd = "echo '$(location //dotnet/src/webdriver:netstandard2.0_strongnamed)' && dotnet build %SRCS% --configuration Release --framework netstandard2.0 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:AssemblyVersion={} /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = 'bin'
name = "netstandard2.0_strongnamed",
srcs = ["WebDriver.Support.csproj"],
cmd = "echo '$(location //dotnet/src/webdriver:netstandard2.0_strongnamed)' && dotnet build %SRCS% --configuration Release --framework netstandard2.0 --output %OUT% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=$(location //dotnet:keyfile) /p:Version={} /p:IntermediateOutputPath=%OUT%\..\obj\ /p:AssemblyVersion={} /p:FileVersion={} /p:BuildSystem=buck".format(SE_VERSION, ASSEMBLY_VERSION, ASSEMBLY_VERSION),
out = "bin",
)

genrule(
name = 'merge_strongnamed',
srcs = [
':net35_strongnamed',
':net40_strongnamed',
':net45_strongnamed',
':netstandard2.0_strongnamed'
],
cmd_exe =
'setlocal EnableDelayedExpansion && ' +
'(if not exist %OUT% mkdir %OUT%) && ' +
'for %%G in (%SRCS%) do (' +
'set target_dir=%%G&& ' +
'set platform_dir=%%G\\..&& ' +
'for %%H in (!target_dir!) do (' +
'for %%I in (!platform_dir!) do set full_platform_moniker=%%~nxI&& ' +
name = "merge_strongnamed",
srcs = [
":net35_strongnamed",
":net40_strongnamed",
":net45_strongnamed",
":netstandard2.0_strongnamed",
],
cmd_exe =
"setlocal EnableDelayedExpansion && " +
"(if not exist %OUT% mkdir %OUT%) && " +
"for %%G in (%SRCS%) do (" +
"set target_dir=%%G&& " +
"set platform_dir=%%G\..&& " +
"for %%H in (!target_dir!) do (" +
"for %%I in (!platform_dir!) do set full_platform_moniker=%%~nxI&& " +
'for /f "delims=_" %%J in (\"!full_platform_moniker!\") do set platform_moniker=%%J&& ' +
'(if not exist %OUT%\\!platform_moniker! mkdir %OUT%\\!platform_moniker!) && ' +
'copy !target_dir!\\WebDriver.Support.dll %OUT%\\!platform_moniker! &&' +
'copy !target_dir!\\WebDriver.Support.xml %OUT%\\!platform_moniker!' +
')' +
')',
out = 'lib'
"(if not exist %OUT%\!platform_moniker! mkdir %OUT%\!platform_moniker!) && " +
"copy !target_dir!\WebDriver.Support.dll %OUT%\!platform_moniker! &&" +
"copy !target_dir!\WebDriver.Support.xml %OUT%\!platform_moniker!" +
")" +
")",
out = "lib",
)

genrule(
name = 'pack_strongnamed',
srcs = ['WebDriver.Support.StrongNamed.nuspec'],
cmd_exe = "$(exe //third_party/dotnet/nuget:nuget) pack %SRCS% /Properties packageid=Selenium.Support.StrongNamed;version={} /Version {} /BasePath $(location :merge_strongnamed) /OutputDirectory %OUT%".format(SE_VERSION, SE_VERSION),
out = 'dist',
visibility = [ 'PUBLIC' ]
name = "pack_strongnamed",
srcs = ["WebDriver.Support.StrongNamed.nuspec"],
cmd_exe = "$(exe //third_party/dotnet/nuget:nuget) pack %SRCS% /Properties packageid=Selenium.Support.StrongNamed;version={} /Version {} /BasePath $(location :merge_strongnamed) /OutputDirectory %OUT%".format(SE_VERSION, SE_VERSION),
out = "dist",
visibility = ["PUBLIC"],
)
Loading

0 comments on commit 29a4201

Please sign in to comment.