flake: patch migrate.py to discover system_migrations
Previously "system_migrations" were silently not applied, because the migration script tries to find them relatively to its own location, but here they are not in the same /bin folder that migrate.py is placed in.
This commit is contained in:
parent
71f8f2a652
commit
8d4ad4d50c
1 changed files with 4 additions and 0 deletions
|
|
@ -164,6 +164,10 @@
|
||||||
cp ${authentik-src}/lifecycle/migrate.py $out/bin/migrate.py
|
cp ${authentik-src}/lifecycle/migrate.py $out/bin/migrate.py
|
||||||
chmod +w $out/bin/migrate.py
|
chmod +w $out/bin/migrate.py
|
||||||
patchShebangs $out/bin/migrate.py
|
patchShebangs $out/bin/migrate.py
|
||||||
|
substituteInPlace $out/bin/migrate.py \
|
||||||
|
--replace \
|
||||||
|
'migration in Path(__file__).parent.absolute().glob("system_migrations/*.py")' \
|
||||||
|
'migration in Path("${staticWorkdirDeps}/lifecycle").glob("system_migrations/*.py")'
|
||||||
wrapProgram $out/bin/migrate.py \
|
wrapProgram $out/bin/migrate.py \
|
||||||
--prefix PATH : ${pythonEnv}/bin \
|
--prefix PATH : ${pythonEnv}/bin \
|
||||||
--prefix PYTHONPATH : ${staticWorkdirDeps}
|
--prefix PYTHONPATH : ${staticWorkdirDeps}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue