Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 10, 2025

  • Understand current .env file usage and version tracking system
  • Modify build-images.sh to use :latest tag for local builds instead of incrementing versions
  • Remove version tracking from .local.env for local builds (marked as deprecated)
  • Modify deploy-helm.sh to use :latest for local deployments
  • Keep .gcp.env for GCP deployments (versions still needed for registry)
  • Update .gitignore to exclude .env backup files
  • Verify the changes work correctly by checking the modified scripts
  • Create comprehensive documentation explaining the changes
  • Address feedback: Support environment variable overrides instead of manual script editing

Summary

Successfully removed reliance on .env files for local development version tracking:

Changes Made:

  1. build-images.sh: Modified to use :latest tag for all local builds, only tracks versions for GCP
  2. deploy-helm.sh: Updated to use "latest" by default, with environment variable override support
  3. .local.env & .env: Added deprecation notices
  4. .gitignore: Added patterns for .local.env.bak and .gcp.env.bak
  5. Documentation: Created version-management.md with env var override examples

Benefits:

  • Simplified local development workflow
  • No more version number conflicts in git
  • Cleaner commit history
  • Follows Docker best practices for local development
  • GCP deployments still maintain version tracking via .gcp.env
  • Users can override versions via environment variables without editing scripts
Original prompt

This section details on the original issue you should resolve

<issue_title>Remove reliance or automate env files that track versions</issue_title>
<issue_description>.env and .gcp.env files track versions of files. Remove reliance on this or check latest version in docker images. Find a way to not need these files. that could also be using :latest for all versions of docker images in build images for local. </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #106


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

### Want to use specific versions locally

If you need specific versions for local testing, you can manually override:
```bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is telling people to manually override in the script the best idea?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, that wasn't ideal. I've updated the approach to use environment variable overrides instead:

# Override versions without editing the script
SENTRIUS_VERSION="1.2.3" ./ops-scripts/local/deploy-helm.sh

The script now uses ${VAR:-default} pattern so users can override any version via environment variables. Updated in commit 7bb8e30.

Copilot AI changed the title [WIP] Remove reliance on env files for version tracking Remove version tracking for local Docker builds, use :latest tag Oct 10, 2025
Copilot AI requested a review from phrocker October 10, 2025 10:26
@phrocker phrocker marked this pull request as ready for review October 10, 2025 10:44
@phrocker
Copy link
Contributor

@copilot left a comment

Copilot AI and others added 4 commits October 24, 2025 18:01
- Modified build-images.sh to use :latest for local builds
- Updated deploy-helm.sh to use :latest instead of reading .local.env
- Added deprecation notes to .env and .local.env files
- Updated .gitignore to properly handle .env backup files
- GCP builds still use version tracking via .gcp.env

Co-authored-by: phrocker <[email protected]>
- Modified deploy-helm.sh to use ${VAR:-default} pattern
- Users can now override versions via environment variables
- Updated docs to recommend env vars instead of script editing
- Addresses feedback about manual script modification

Co-authored-by: phrocker <[email protected]>
@phrocker phrocker force-pushed the copilot/remove-env-file-reliance branch from 0993e5b to 33a58c9 Compare October 24, 2025 22:02
@phrocker phrocker merged commit 3c6d8bd into main Oct 24, 2025
9 checks passed
phrocker added a commit that referenced this pull request Nov 27, 2025
* Initial plan

* Fix sidebar menu collapse by removing accordion behavior

Co-authored-by: phrocker <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: phrocker <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove reliance or automate env files that track versions

2 participants