Skip to content

Commit a27ef88

Browse files
feat: Open source the application (#245)
* chore: Update Dependencies * refactor: Remove code obfuscation steps from build process * refactor: Remove license management code and related dialogs * chore: Update support URL to point to GitHub issues page * feat: Implement GitHub release service for automatic updates and add related tests * fix: Update SQL query execution to use parameterized queries and improve security --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 0b1ab87 commit a27ef88

38 files changed

+5315
-2358
lines changed

.github/workflows/package.yml

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -58,77 +58,11 @@ jobs:
5858
run: |
5959
${{ matrix.pre-command }}
6060
61-
# This job is used to set the necessary TRIAL information until we have a better solution
62-
- name: Set build variables
63-
id: build_vars
64-
run: |
65-
# Set build timestamp
66-
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
67-
echo "BUILD_DATE=$BUILD_DATE" >> $GITHUB_ENV
68-
echo "build_date=$BUILD_DATE" >> $GITHUB_OUTPUT
69-
70-
# Set expiration days (from input or default)
71-
LICENSE_EXPIRATION_DAYS="${{ github.event.inputs.expiration_days || '30' }}"
72-
echo "LICENSE_EXPIRATION_DAYS=$LICENSE_EXPIRATION_DAYS" >> $GITHUB_ENV
73-
echo "license_expiration_days=$LICENSE_EXPIRATION_DAYS" >> $GITHUB_OUTPUT
74-
75-
# Calculate expiration timestamp
76-
if [[ "$OSTYPE" == "darwin"* ]]; then
77-
# macOS
78-
EXPIRATION_DATE=$(date -u -v+${LICENSE_EXPIRATION_DAYS}d +"%Y-%m-%dT%H:%M:%SZ")
79-
else
80-
# Linux
81-
EXPIRATION_DATE=$(date -u -d "+${LICENSE_EXPIRATION_DAYS} days" +"%Y-%m-%dT%H:%M:%SZ")
82-
fi
83-
echo "EXPIRATION_DATE=$EXPIRATION_DATE" >> $GITHUB_ENV
84-
echo "expiration_date=$EXPIRATION_DATE" >> $GITHUB_OUTPUT
85-
86-
# Update pyproject.toml with Briefcase build revision info
87-
toml set --toml-path pyproject.toml tool.briefcase.revision "$(git rev-parse --short HEAD)"
88-
89-
# Extract the version
90-
VERSION=$(poetry version -s)
91-
echo "VERSION=$VERSION" >> $GITHUB_ENV
92-
echo "version=$VERSION" >> $GITHUB_OUTPUT
93-
94-
echo "🔧 Build Configuration:"
95-
echo " - Build Time: $BUILD_DATE"
96-
echo " - Expiration: $EXPIRATION_DATE ($LICENSE_EXPIRATION_DAYS days)"
97-
echo " - Version: $VERSION"
98-
99-
- name: Generate build configuration
100-
run: |
101-
# Create build_config.py that will be imported by settings
102-
cat > src/stonks_overwatch/build_config.py << EOF
103-
# Auto-generated build configuration
104-
# Generated at: ${{ env.BUILD_DATE }}
105-
106-
from datetime import datetime
107-
108-
# Trial License configuration
109-
TRIAL_MODE = True
110-
LICENSE_EXPIRATION_DAYS = ${{ env.LICENSE_EXPIRATION_DAYS }}
111-
BUILD_DATE = '${{ env.BUILD_DATE }}'
112-
EXPIRATION_DATE = '${{ env.EXPIRATION_DATE }}'
113-
114-
# Version information
115-
VERSION = '${{ env.VERSION }}'
116-
EOF
117-
118-
echo "📄 Generated build_config.py:"
119-
cat src/stonks_overwatch/build_config.py
120-
# ========= The special jobs end here =========
121-
12261
- name: Collect Static Files
12362
run: |
12463
# Collect static files for the app
12564
make collectstatic
12665
127-
- name: Code Obfuscation
128-
run: |
129-
# Obfuscate the code for the app
130-
make obfuscate
131-
13266
- name: Build App for ${{ matrix.target }}
13367
run: |
13468
${{ matrix.briefcase-build-prefix }} \

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ _This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) a
2020
- Added ability to show/hide columns
2121
- Added ability to show all the rows in a single page
2222

23-
### Changed
23+
### Removed
24+
25+
- Removed license controls to make the application open source and free to use
2426

2527
- Add stability indicators for broker integrations and tooltips for unstable portfolios
2628
- **Portfolio**:
@@ -42,6 +44,7 @@ _This project follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) a
4244
### Security
4345

4446
- Routine dependency updates for security and stability
47+
- Fixed permission issue when downloading Stonks Overwatch update installers
4548

4649
---
4750

Makefile

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,10 @@ DEBUG_MODE := $(if $(debug),true,false)
2727
PROFILE_MODE := $(if $(profile),true,false)
2828
DEMO_MODE := $(if $(demo),true,false)
2929

30-
# Obfuscation flag (default: true, can be overridden with obfuscate=false)
31-
OBFUSCATE_MODE := $(if $(obfuscate),$(obfuscate),true)
32-
3330
# Export variables for child processes
3431
export DEBUG_MODE
3532
export PROFILE_MODE
3633
export DEMO_MODE
37-
export OBFUSCATE_MODE
3834

3935
# Color codes for output
4036
BOLD := \033[1m
@@ -240,12 +236,7 @@ _create-wheels: ## Internal: Create wheel files for Briefcase
240236
done; \
241237
done
242238

243-
obfuscate: ## Obfuscate code for Briefcase packaging (use obfuscate=false to disable)
244-
@echo -e "$(BOLD)$(BLUE)Obfuscating code for Briefcase...$(RESET)"
245-
@echo -e "$(YELLOW)Obfuscate Code: $(OBFUSCATE_MODE)$(RESET)"
246-
bash scripts/obfuscate.sh
247-
248-
briefcase-create: install collectstatic _create-wheels obfuscate ## Create Briefcase project
239+
briefcase-create: install collectstatic _create-wheels ## Create Briefcase project
249240
@echo -e "$(BOLD)$(GREEN)Creating Briefcase project...$(RESET)"
250241
rm -rf build
251242
poetry run briefcase create

0 commit comments

Comments
 (0)