Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scrooge #10

Merged
merged 6 commits into from
Jun 13, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
build:
needs: prepare
uses: ./.github/workflows/_extension_distribution.yml
if: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME != '' }}
with:
duckdb_version: v1.0.0
extension_name: ${{ needs.prepare.outputs.COMMUNITY_EXTENSION_NAME }}
Expand Down
13 changes: 13 additions & 0 deletions extensions/scrooge/description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extension:
name: scrooge
description: Provides functionality for financial data-analysis
version: 0.0.1
language: C++
build: cmake
license: MIT
maintainers:
- pdet

repo:
github: pdet/Scrooge-McDuck
ref: 9520aeba138a6bb43f766ed4f78accac026bfae0
24 changes: 19 additions & 5 deletions scripts/build.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,31 @@
import os
import sys
import yaml

# TODO: check prefix, needs to be in installation dir

desc_files = os.environ['ALL_CHANGED_FILES'].split(' ')
if len(desc_files) != 1:
if 'ALL_CHANGED_FILES' in os.environ:
desc_files = os.environ['ALL_CHANGED_FILES'].split(' ')
else:
desc_files = []

print(f"Files changed: {desc_files}")

if len(desc_files) > 1:
raise ValueError('cannot have multiple descriptors changed or packages with spaces in their names')

if len(desc_files) == 0 or len(desc_files[0]) == 0:
print("No changed files, nothing will be built")
with open('env.sh', 'w+') as hdl:
hdl.write(f"COMMUNITY_EXTENSION_GITHUB=\n")
hdl.write(f"COMMUNITY_EXTENSION_REF=\n")
hdl.write(f"COMMUNITY_EXTENSION_NAME=\n")
sys.exit(os.EX_OK)

desc_file = desc_files[0]
if len(desc_file) == 0:
desc_file = 'extensions/quack/description.yml'

with open(desc_file, 'r') as stream:
desc = yaml.safe_load(stream)
desc = yaml.safe_load(stream)

print(desc)

Expand Down
Loading