mirror of
https://github.com/shadiestgoat/obsidian-layout-manager.git
synced 2026-07-22 05:49:12 +00:00
Why is esbuild like this
This commit is contained in:
parent
e99a0f8343
commit
0a6a611dea
1 changed files with 10 additions and 5 deletions
|
|
@ -5,6 +5,15 @@ base="$(dirname $0)"
|
|||
|
||||
gh auth status
|
||||
|
||||
dist_dir="$base/../dist"
|
||||
rm -r "$dist_dir" || echo "dist doesn't exist, continuing"
|
||||
|
||||
OUTPUT="$dist_dir" PROJECT_DIR="$(readlink -e "$base/..")" node "$base"/esbuild.config.mjs production
|
||||
if ! [[ -f "$dist_dir/main.js" ]]; then
|
||||
echo "Error! Failed to compile for some reason, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cur_version=$(yq '.version' "$base"/../package.json -oy)
|
||||
ver_split=(${cur_version//./ })
|
||||
|
||||
|
|
@ -19,7 +28,7 @@ new_version=${new_version#(}
|
|||
new_version=${new_version%)}
|
||||
|
||||
if ! gum confirm "So, bump $cur_version to ${new_version}?"; then
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
|
||||
yq ".version=\"$new_version\"" "$base"/../package.json -ioj
|
||||
|
|
@ -27,12 +36,8 @@ yq ".version=\"$new_version\"" "$base"/../manifest.json -ioj
|
|||
|
||||
min_app=$(yq '.minAppVersion' "$base"/../manifest.json -oy)
|
||||
|
||||
dist_dir="$base/../dist"
|
||||
|
||||
yq ".\"$new_version\" = \"$min_app\"" "$base"/../versions.json -ioj
|
||||
|
||||
OUTPUT="$dist_dir" PROJECT_DIR="$(readlink -e "$base/..")" node "$base"/esbuild.config.mjs production
|
||||
|
||||
git -C "$base/.." add './package.json'
|
||||
git -C "$base/.." add './manifest.json'
|
||||
git -C "$base/.." add './versions.json'
|
||||
|
|
|
|||
Loading…
Reference in a new issue