Skip to content

Commit

Permalink
fixup! test
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-carlborg committed Dec 21, 2023
1 parent 852101e commit e192f74
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 24 deletions.
46 changes: 23 additions & 23 deletions .github/workflows/bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,27 @@ jobs:
# path: /usr/share/OVMF/OVMF.fd
# key: ovmf_file

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

# - name: Run CI Script
# run: ./ci.rb
#
# - name: Run Tests
# run: ./test.rb
#
# - name: Extract Version
# id: version
# if: startsWith(github.ref, 'refs/tags/v')
# run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}
#
# - name: Create Release
# id: create_release
# if: startsWith(github.ref, 'refs/tags/v')
# uses: softprops/action-gh-release@v1
# with:
# name: Resources ${{ steps.version.outputs.VERSION }}
# draft: true
# files: '*.tar'
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run CI Script
run: ./ci.rb

- name: Run Tests
run: ./test.rb

- name: Extract Version
id: version
if: startsWith(github.ref, 'refs/tags/v')
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/v}

- name: Create Release
id: create_release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
name: Resources ${{ steps.version.outputs.VERSION }}
draft: true
files: '*.tar'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 changes: 28 additions & 1 deletion ci.rb
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,34 @@ def install_prerequisite

# Python 3.12 doesn't have the distutils module
def setup_correct_python
target = '/usr/local/Cellar/glib/2.78.3/share/glib-2.0/codegen/utils.py'
patch = <<~DIFF
diff --git a/gio/gdbus-2.0/codegen/utils.py b/gio/gdbus-2.0/codegen/utils.py
index 02046108dae49efb140c6438b03b80a73770d2c0..08f1ba9731d0582015ef9807eb739a3efa410e0d 100644
--- a/gio/gdbus-2.0/codegen/utils.py
+++ b/gio/gdbus-2.0/codegen/utils.py
@@ -19,7 +19,7 @@
#
# Author: David Zeuthen <[email protected]>
-import distutils.version
+import packaging.version
import os
import sys
@@ -166,4 +166,4 @@ def version_cmp_key(key):
v = str(key[0])
else:
v = "0"
- return (distutils.version.LooseVersion(v), key[1])
+ return (packaging.version.Version(v), key[1])
DIFF

Dir.chdir("/usr/local/Cellar/glib/2.78.3/share/glib-2.0") do
_, status = Open3.capture2("patch", "-p3", stdin_data: patch)
raise "Failed to execute 'patch' command" unless status.success?
end

puts `cat /usr/local/Cellar/glib/2.78.3/share/glib-2.0/codegen/utils.py`
end

class Qemu < Host::Qemu
Expand Down

0 comments on commit e192f74

Please sign in to comment.