Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions .github/workflows/python-package-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ jobs:
build
--user
- name: Build a binary wheel and a source tarball
env:
VERSION: ${{ env.VERSION }}
run: >-
python -m
build
Expand All @@ -56,16 +54,10 @@ jobs:
python-version: 3.11
activate-environment: build
environment-file: .github/conda-envs/build.yml
conda-build-version: "*"
- name: Build a Conda tarbal
env:
VERSION: ${{ env.VERSION }}
run: |
export VERSION="${VERSION}"
echo "Building conda package with VERSION=${VERSION}"
conda build -c conda-forge -c cmutel -c lca -c mrvisscher ./recipe/
conda build -c conda-forge -c cmutel -c lca ./recipe/
- name: Publish to Anaconda
run: |
anaconda -t ${{ secrets.CONDA_LCA }} upload \
/usr/share/miniconda/conda-bld/noarch/*.conda

/usr/share/miniconda/envs/build/conda-bld/noarch/*.conda
9 changes: 3 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,14 @@ jobs:
python-version: 3.11
activate-environment: build
environment-file: .github/conda-envs/build.yml
conda-build-version: "*"
- name: Build activity-browser stable
env:
VERSION: ${{ github.ref_name }}
run: |
export VERSION="${VERSION}"
echo "Building conda package with VERSION=${VERSION}"
conda build -c conda-forge -c cmutel -c lca -c mrvisscher recipe/
conda build -c conda-forge -c cmutel -c lca recipe/
- name: Upload to anaconda.org
run: |
anaconda -t ${{ secrets.CONDA_UPLOAD_TOKEN }} upload \
/usr/share/miniconda/conda-bld/noarch/*.conda
/usr/share/miniconda/envs/build/conda-bld/noarch/*.conda
- name: Update wiki
run: ./.github/scripts/update_wiki.sh "Automated documentation update for $GITHUB_REF_NAME" "${{ secrets.GITHUB_TOKEN }}"
run: ./.github/scripts/update_wiki.sh "Automated documentation update for $GITHUB_REF_NAME" "${{ secrets.GITHUB_TOKEN }}"
5 changes: 2 additions & 3 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{% set ab_version = os.environ.get('VERSION', 'dev') %}
package:
name: activity-browser
version: {{ ab_version }}
version: "{{ os.environ.get('VERSION', 'dev') }}"

source:
path: ..

build:
noarch: python
number: 0
script: export VERSION="{{ ab_version }}" && {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt
script: "{{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt"
entry_points:
- activity-browser = activity_browser:run_activity_browser
- activity-browser-cleanup = activity_browser.bwutils:cleanup
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
import os
from setuptools import setup

version = os.environ.get("VERSION") or os.environ.get("PKG_VERSION")
if not version:
if "VERSION" in os.environ:
version = os.environ["VERSION"]
elif "PKG_VERSION" in os.environ:
version = os.environ["PKG_VERSION"]
else:
version = os.environ.get("GIT_DESCRIBE_TAG", "0.0.0")
if "-" in version:
versions = version.split("-")
Expand Down
Loading