10 lines
371 B
Bash
Executable File
10 lines
371 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
VERSION=$(cat pyproject.toml | grep version= | cut -d'"' -f 2)
|
|
SHA=$(git rev-parse --short HEAD)
|
|
TS=$(git log -1 --format=%ct HEAD)
|
|
sed "s/0.0.1/${VERSION}/g" -i src/foundation/__init__.py
|
|
sed "s/abcdefgh/${SHA}/g" -i src/foundation/__init__.py
|
|
sed "s/1234567890/${TS}/g" -i src/foundation/__init__.py
|
|
cat src/foundation/__init__.py |