How to use variables in Bintray deployment?

fredrik.averpil's Avatar

fredrik.averpil

23 Aug, 2016 03:52 PM

I have this:

after_build:
  # Package
  - if ($Env:APPVEYOR_REPO_BRANCH -eq "master") {$PACKAGE = "wheels"}
  - if ($Env:APPVEYOR_REPO_BRANCH -ne "master") {$PACKAGE = "development"}
  # Version
  - ps: $VERSION = (((Get-Content C:\pyside-setup\setup.py | %{ if ($_.Split('=')[0] -match "^__version__") { $_; } }) -replace "__version__ = ", "") -replace '"', "")

artifacts: 
  - path: deploy\*.zip
    name: mypackage

deploy:
- provider: BinTray
  username: fredrikaverpil
  subject: fredrikaverpil
  api_key:
    # api key from https://bintray.com/profile/edit
    # encrypted in https://ci.appveyor.com/tools/encrypt
    secure: AAA+BBB=
  repo: pyside2-wheels
  package: development
  version: 2.0
  artifact: mypackage
  publish: true
  override: true
  explode: true

In my Bintray deploy: section, I'd really like to be able to use package: $PACKAGE and version: $VERSION. Can this somehow be achieved?

  1. 1 Posted by fredrik.averpil on 23 Aug, 2016 08:35 PM

    fredrik.averpil's Avatar

    Solved it!

    after_build:
      # Package
      - if ($Env:APPVEYOR_REPO_BRANCH -eq "master") {$env:PYSIDE_PACKAGE_NAME = "pyside2"}
      - if ($Env:APPVEYOR_REPO_BRANCH -ne "master") {$env:PYSIDE_PACKAGE_NAME = "development"}
      # Version
      - ps: $env:PYSIDE_VERSION = (((Get-Content C:\pyside-setup\setup.py | %{ if ($_.Split('=')[0] -match "^__version__") { $_; } }) -replace "__version__ = ", "") -replace '"', "")
    
    artifacts: 
      - path: deploy\*.zip
        name: mypackage
    
    deploy:
    - provider: BinTray
      username: fredrikaverpil
      subject: fredrikaverpil
      api_key:
        # api key from https://bintray.com/profile/edit
        # encrypted in https://ci.appveyor.com/tools/encrypt
        secure: AAA+BBB=
      repo: pyside2-wheels
      package: $(PYSIDE_PACKAGE_NAME)
      version: $(PYSIDE_VERSION)
      artifact: mypackage
      publish: true
      override: true
      explode: true
    
  2. fredrik.averpil closed this discussion on 24 Aug, 2016 05:14 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac