tag:help.appveyor.com,2012-11-13:/discussions/questions/2583-does-bintray-provider-respect-any-environment-variablesAppVeyor: Discussion 2018-08-25T02:08:06Ztag:help.appveyor.com,2012-11-13:Comment/405892432016-08-22T21:09:13Z2016-08-22T21:09:13ZDoes BinTray provider respect any environment variables?<div><p>Yes, custom environment variables should be respected there.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T00:16:38Z2016-08-23T00:16:38ZDoes BinTray provider respect any environment variables?<div><p>Is there a list of what gets used by the provider, or is it the
straight<br>
configuration options?</p></div>lenox.josephtag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T00:35:29Z2016-08-23T00:35:29ZDoes BinTray provider respect any environment variables?<div><p>This is the list of system environment variables: <a href="https://www.appveyor.com/docs/environment-variables/">https://www.appveyor.com/docs/environment-variables/</a></p>
<p>You can use any environment variable though like this: <a href="https://www.appveyor.com/docs/deployment/#environment-variables-in-provider-settings">
https://www.appveyor.com/docs/deployment/#environment-variables-in-...</a></p>
<p>-Feodor Fitsner, AppVeyor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T02:28:01Z2016-08-23T02:28:01ZDoes BinTray provider respect any environment variables?<div><p>If I define a new environment variable in the pre-deployment
script, will<br>
it be used during deployment?</p>
<p>--Joseph Lenox</p></div>lenox.josephtag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T02:29:48Z2016-08-23T02:29:48ZDoes BinTray provider respect any environment variables?<div><p>It should though I can say for sure if see your appveyor.yml</p>
<p>-Feodor Fitsner, AppVeyor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T15:21:41Z2016-08-23T15:21:41ZDoes BinTray provider respect any environment variables?<div><p>Apparently not, I had set $packagevar in the configuration and
created the<br>
environment variable using the following script:</p>
<p>[Environment]::SetEnvironmentVariable("packagevar",
"Slic3r_Branches", "User") If ($APPVEYOR_REPO_BRANCH -like
"master")<br>
{[Environment]::SetEnvironmentVariable("packagevar", "slic3r_dev",
"User")}</p>
<p>Uploading "slic3r-3440-draft-shield--566bbbd.zip" to BinTray
as<br>
lordofhyphens/Slic3r/$packagevar/1.3.0-3440-draft-shield-165/slic3r-3440-draft-shield--566bbbd.zip</p>
<p>--Joseph Lenox</p></div>lenox.josephtag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T16:07:12Z2016-08-23T16:07:12ZDoes BinTray provider respect any environment variables?<div><p>Correct code might be:</p>
<pre>
<code>If ($env:APPVEYOR_REPO_BRANCH -eq "master") { $env:packagevar = 'slic3r_dev' } else { $env:packagevar = 'Slic3r_Branches' }</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T20:07:26Z2016-08-23T20:07:29ZDoes BinTray provider respect any environment variables?<div><p>Having this very same issue. Posted about it here: <a href="http://help.appveyor.com/discussions/questions/2585-how-to-use-variables-in-bintray-deployment">
http://help.appveyor.com/discussions/questions/2585-how-to-use-vari...</a></p></div>fredrik.averpiltag:help.appveyor.com,2012-11-13:Comment/405892432016-08-23T20:39:06Z2016-08-23T20:40:08ZDoes BinTray provider respect any environment variables?<div><p>I solved it:</p>
<pre>
<code>after_build:
- $env:SOMETHING_UNIQUE = "MyPackageName"
deploy:
- provider: BinTray
package: $(SOMETHING_UNIQUE)</code>
</pre></div>fredrik.averpiltag:help.appveyor.com,2012-11-13:Comment/405892432016-08-24T00:26:09Z2016-08-24T00:26:09ZDoes BinTray provider respect any environment variables?<div><p>Right, this is expected, because build execution is not single
PowerShell script, and variables are not preserved between separate
PowerShell statements, while environment variables do exist till
the end of build job.</p>
<p>--ilya,</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/405892432016-08-24T06:05:43Z2016-08-24T06:05:45ZDoes BinTray provider respect any environment variables?<div><blockquote>
<p>Right, this is expected, because build execution is not single
PowerShell script, and variables are not preserved between separate
PowerShell statements, while environment variables do exist till
the end of build job.</p>
</blockquote>
<p>It took some time to figure this out, as I wasn't able to call
that environment variable like <code>$env:SOMETHING_UNIQUE</code>
or <code>$SOMETHING_UNIQUE</code>. Instead I had to call it like
<code>$(SOMETHING_UNIQUE)</code>.</p></div>fredrik.averpiltag:help.appveyor.com,2012-11-13:Comment/405892432016-08-24T07:51:47Z2016-08-24T07:51:47ZDoes BinTray provider respect any environment variables?<div><p>Thanks, that works. Maybe this should be added to the main
support<br>
documents?</p></div>lenox.josephtag:help.appveyor.com,2012-11-13:Comment/405892432016-08-24T08:11:58Z2016-08-24T08:11:59ZDoes BinTray provider respect any environment variables?<div><blockquote>
<p>Thanks, that works. Maybe this should be added to the main
support documents?</p>
</blockquote>
<p>+1</p></div>fredrik.averpiltag:help.appveyor.com,2012-11-13:Comment/405892432016-08-24T20:38:19Z2016-08-24T20:38:19ZDoes BinTray provider respect any environment variables?<div><p>There is a note about that: <a href="https://www.appveyor.com/docs/deployment/#environment-variables-in-provider-settings">
https://www.appveyor.com/docs/deployment/#environment-variables-in-...</a></p>
<p>You may contribute to the documentation if you feel something's
missing.</p></div>Feodor Fitsner