Skip to content

Commit

Permalink
Update workflow to use new version updater for flathub
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjacob committed Sep 30, 2023
1 parent f57f9fd commit 8f0a207
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
46 changes: 22 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ jobs:
sparse-checkout: |
pip/flatpak_pip_generator.py
cargo/flatpak-cargo-generator.py
git_source_update.py
path: tools
sparse-checkout-cone-mode: false

Expand All @@ -121,7 +122,7 @@ jobs:
- name: Generate requirements.txt
run: |
python -m pip install --upgrade pip
pip install pipenv requirements-parser aiohttp toml
pip install pipenv requirements-parser aiohttp toml pyyaml
pipenv requirements > requirements.txt
- name: Obtain base python requirement sources
Expand All @@ -134,11 +135,11 @@ jobs:
- name: Update other sources manually
run: |
sed -i "s,tag: \"[^\"]*\",tag: \"$GITHUB_REF_NAME\"," app.bbsync.BlackboardSync.yml
sed -i "s,tag\": \"v[^\"]*\",tag\": \"$MATURIN_REF\"," python-maturin/python-maturin.json
sed -i "s,tag\": \"v[^\"]*\",tag\": \"$PYDANTIC_CORE_REF\"," pydantic-core/pydantic-core.json
../tools/git*.py *.yml --update PyO3/maturin $MATURIN_REF --update pydantic/pydantic-core $PYDANTIC_CORE_REF --update jacobszpz/BlackboardSync $GITHUB_REF_NAME
working-directory: flathub

# pydantic-core

- name: Obtain Cargo.lock for pydantic-core
uses: actions/checkout@v4
with:
Expand All @@ -150,6 +151,8 @@ jobs:
sparse-checkout-cone-mode: false
clean: false

# python-maturin

- name: Obtain Cargo.lock for maturin
uses: actions/checkout@v4
with:
Expand All @@ -161,29 +164,24 @@ jobs:
sparse-checkout-cone-mode: false
clean: false

- name: Move temp Cargo.lock to actual dir
- name: Generate sources for python-maturin and pydantic-core
run: |
mv python-maturin-tmp/* python-maturin/
mv pydantic-core-tmp/* pydantic-core/
rm -rf *-tmp
# pydantic-core
mv pydantic-core-tmp/Cargo.lock .
../tools/cargo/flatpak* Cargo.lock
mv generated-sources.json pydantic-core-generated-sources.json
rm Cargo.lock
# python-maturin
mv python-maturin-tmp/Cargo.lock .
../tools/cargo/flatpak* Cargo.lock
../tools/pip/flatpak* setuptools-rust
mv generated-sources.json python-maturin-generated-sources.json
rm Cargo.lock
# Cleanup
rm -rf test-crates pydantic-core-tmp python-maturin-tmp
working-directory: flathub

- name: Obtain sources for pydantic-core
run: |
../../tools/cargo/flatpak* Cargo.lock
working-directory: flathub/pydantic-core

- name: Obtain sources for maturin
run: |
../../tools/cargo/flatpak* Cargo.lock
../../tools/pip/flatpak* setuptools-rust
working-directory: flathub/python-maturin

- name: Cleanup
run: |
rm **/Cargo.lock
rm -rf **/test-crates
working-directory: flathub
# Deploy to GitHub

- name: Set up github user and email
run: |
Expand Down
2 changes: 1 addition & 1 deletion blackboard_sync/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
__summary__ = "Automatic Syncing Of Your Blackboard Content"
__uri__ = "https://github.com/jacobszpz/BlackboardSync"

__version__ = "0.9.12-alpha.1.2"
__version__ = "0.9.12-alpha.2"

__author__ = "Jacob Sánchez"
__email__ = "jacobszpz@protonmail.com"
Expand Down

0 comments on commit 8f0a207

Please sign in to comment.