File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ Param (
2
+ [switch ] $upload = $false
3
+ )
4
+ $user = ' openhydrology'
5
+ $channel = ' dev'
6
+
7
+ $pyversions = ' 3.3' , ' 3.4' , ' 3.5'
8
+ $build_platform = ' win-64'
9
+ $other_platforms = ' osx-64' , ' linux-64'
10
+
11
+ $build_folder = " $env: LOCALAPPDATA \Continuum\Miniconda3\conda-bld"
12
+
13
+ $built_pkgs = @ ()
14
+ foreach ($pyversion in $pyversions ) {
15
+ conda build conda- recipe -- python= $pyversion
16
+ if ($lastexitcode -ne 0 ) {
17
+ Throw " Conda build failed with exit code $lastexitcode "
18
+ }
19
+ $pkg = conda build conda- recipe -- python= $pyversion -- output
20
+ $built_pkgs += $pkg
21
+
22
+ $pkg_name = (Get-Item $pkg ).Name
23
+ foreach ($platform in $other_platforms ) {
24
+ conda convert -- platform $platform -- output- dir $build_folder $pkg
25
+ if ($lastexitcode -ne 0 ) {
26
+ Throw " Conda convert failed with exit code $lastexitcode "
27
+ }
28
+ $built_pkgs += " $build_folder \$platform \$pkg_name "
29
+ }
30
+ }
31
+
32
+ if ($upload ) {
33
+ foreach ($pkg in $built_pkgs ) {
34
+ anaconda upload -- user $user -- channel $channel -- force $pkg
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments