diff --git a/scripts/build.sh b/scripts/build.sh index 13ee4035..e4800353 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -10,6 +10,6 @@ scripts/excmds_macros.py scripts/newtab.md.sh scripts/make_docs.sh & -webpack --display errors-only & +(webpack --display errors-only && scripts/git_version.sh)& wait diff --git a/scripts/git_version.sh b/scripts/git_version.sh new file mode 100755 index 00000000..0d68aea4 --- /dev/null +++ b/scripts/git_version.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +version=$(git describe --tags) + +sed -i 's/REPLACE_ME_WITH_THE_VERSION_USING_SED/'$version'/' ./build/background.js diff --git a/src/excmds.ts b/src/excmds.ts index 2e672ecc..ed5e0d68 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -511,6 +511,13 @@ export function suppress(preventDefault?: boolean, stopPropagation?: boolean) { mode("ignore") } +//#background +export function version(){ + clipboard("yank","REPLACE_ME_WITH_THE_VERSION_USING_SED") + fillcmdline_notrail("REPLACE_ME_WITH_THE_VERSION_USING_SED") + +} + /** Example: - `mode ignore` to ignore all keys. */