Skip to content

Releases: NielBuys/git-changed-copier

v2.0.0

Choose a tag to compare

@NielBuys NielBuys released this 02 Jul 10:59

v2.0.0 — SQL release pipeline: dependants, single-file generation, and a database runner

This release grows the tool from a simple "copy changed files" utility into a three-tab
SQL release pipeline: extract the change set, pull in dependent-module copies, consolidate
into one ordered script per environment, and run it across many databases with error
tracking and retry.

✨ New — Copy Changed Files (tab 1)

  • Add Dependent Files: for every changed file under a main SQL folder (e.g. SQL\ModuleA),
    also copy the same-named file from one or more dependent folders (e.g. SQL\ModuleB;SQL\ModuleC).
    Covers the case where a module keeps its own copy of an object that wasn't changed in Git
    but must still be redeployed.
    • Name matching ignores a leading run-order prefix (1–2 digits + _, e.g. 1_view.sql),
      so 0_view.sql matches view.sql, while date-stamped scripts (20240115_…) only match
      identical stamps.
  • Each action lists its own result set in the grid, and the lists are auto-saved as
    <Tag>_ChangedFiles.csv / <Tag>_DependentFiles.csv in the target folder.

✨ New — Generate Single SQL File (tab 2)

  • Consolidates the change set into one ordered .sql per environment, driven by small
    JSON config files (Scripts → Folders → filename order, non-recursive), with each file
    emitted as its own GO batch and no wrapping transaction.
  • Reuses the Copy Changed Files settings (shown read-only for review), auto-saves into the
    release folder as <ToTag>_<Env>_from_<FromTag>.sql, and writes an audit header
    (repository, from/to tags, environment, databases, timestamp).
  • Passes option to emit the ordered set multiple times for forward-dependency resolution.

✨ New — Run On Databases (tab 3)

  • Runs a .sql file against every database in an environment JSON via sqlcmd, with a
    per-database OK/ERROR results grid and a full error log.
  • Continues past errors (each GO batch is independent) and reports every failure.
  • Export Run Log, plus auto-saved _RunLog.txt / _RunResults.csv — previous runs are
    backed up as _1, _2, … so the clean names always hold the latest run.
  • Re-run failed only and Load Failed From CSV (auto-detects the results file) to
    retry just the failed databases, even across app restarts.
  • Connection resilience for VPN/remote runs: login timeout, query timeout,
    connectivity-only auto-retry (retries + wait), a Cancel button, and a responsive UI.
  • Password is passed via the SQLCMDPASSWORD environment variable (never on the command line);
    input is read as UTF-8.

🐛 Fixes

  • Fixed a use-after-free/double-free when the target folder already existed and was non-empty.
  • Fixed the extension filter: blank, * or *.* now correctly means "all files" (previously
    matched nothing).
  • Normalise Git's forward-slash paths so nested sub-folders are always created and copied.
  • Fixed mixed-encoding output: UTF-16/ANSI source files are normalised to UTF-8 when
    building the single file, eliminating Incorrect syntax near '?' errors under sqlcmd.

🔧 Other

  • All settings (paths, tags, filters, connection details, timeouts) persist to
    ChangedGitFiles.ini.
  • README rewritten with examples and the JSON config-file format.

Requirements

  • Git on PATH; Windows; sqlcmd on PATH for the Run On Databases tab.

v1.0.1

Choose a tag to compare

@NielBuys NielBuys released this 08 Jul 10:13

📦 Release Notes

🛠 Fixes

  • Resolved an issue where not all files were copied when a large number of files were detected in the git diff.
    The copy process now reliably includes all expected files.

Full Changelog: v1.0.0...v1.0.1

v1.0.0

Choose a tag to compare

@NielBuys NielBuys released this 27 Jun 12:36