Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Tag your release

    Code Block
    languagebash
    themeRDarkMidnight
    git tag ${VERSION}


  • Clean the checkout: the sdist step below will

    Code Block
    languagebash
    themeRDarkMidnight
    git clean -fxd


  • Tarball the repo

    Code Block
    languagebash
    themeRDarkMidnight
    git archive --format=tar.gz ${VERSION} --prefix=apache-airflow-${VERSION}/ -o apache-airflow-${VERSION}-source.tar.gz


  • Generate sdist
    NOTE: Make sure your checkout is clean at this stage - any untracked or changed files will otherwise be included in the file produced.

    Code Block
    languagebash
    themeRDarkMidnight
    python setup.py compile_assets sdist


  • Rename the sdist

    Code Block
    languagebash
    themeRDarkMidnight
    mv dist/apache-airflow-${VERSION%rc?}.tar.gz apache-airflow-${VERSION}-bin.tar.gz


  • Generate SHA512/ASC (If you have not generated a key yet, generate it by following instructions on http://www.apache.org/dev/openpgp.html#key-gen-generate-key)
    </path to airflow source>/dev/sign.sh apache-airflow-${VERSION}-source.tar.gz && </path to airflow source>/dev/sign.sh apache-airflow-${VERSION}-bin.tar.gz

  • Push Tags

    Code Block
    languagebash
    themeRDarkMidnight
    git push --tags


  • Push the artefacts to ASF dev dist repo

    Code Block
    languagebash
    themeRDarkMidnight
    # First clone the repo
    svn checkout https://dist.apache.org/repos/dist/dev/airflow airflow-dev
    
    # Create new folder for the release
    cd airflow-dev
    svn mkdir ${VERSION}
    
    # Move the artefacts to svn folder & commit
    mv AIRFLOW_REPO_ROOT/apache-airflow-${VERSION}* 
    airflow-dev/${VERSION}/
    svn add *
    svn commit -m "Add artefacts for Airflow ${VERSION}" 


...

Code Block
languagebash
themeRDarkMidnight
# Create PGP Key
gpg --gen-key

# Checkout ASF dist repo
svn checkout https://dist.apache.org/repos/dist/release/airflow
cd airflow


# Add your GPG pub key to KEYS file. Replace "Kaxil Naik" with your name
(gpg --list-sigs "Kaxil Naik" && gpg --armor --export "Kaxil Naik" ) >> KEYS


# Commit the changes
svn commit -m "Add PGP keys of Airflow developers"

...

  • Create a ~/.pypirc file:

    Code Block
    languagebash
    $ cat ~/.pypirc 
    [distutils]
    index-servers =
      pypi
      pypitest
    
    [pypi]
    username=your-username
    password=*********
    
    [pypitest]
    repository=https://test.pypi.org/legacy/
    username=your-username
    password=*********

    (more details here.)

  • Set proper permissions for the pypirc file:

    Code Block
    languagebash
    $ chmod 600 ~/.pypirc


  • Confirm that airflow/version.py is set properly.
  • Install the package in PyPi's test environment:

    Code Block
    languagebash
    themeMidnight
    $ python setup.py compile_assets sdist upload -r pypitest


  • Verify that the test package looks good by downloading it and installing it into a virtual environment. The package download link is available at:
    https://test.pypi.org/project/apache-airflow/#files
  • Install the package in PyPi's production environment:

    Code Block
    languagebash
    themeMidnight
    $ python setup.py compile_assets sdist upload -r pypi


  • Again, confirm that the package is available here:
    https://pypi.python.org/pypi/apache-airflow

...