aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-23 08:59:31 -0500
committerLibravatar Vijay A <vraravam@users.noreply.github.com>2022-04-23 08:59:31 -0500
commit148b852d6ee1cfd60959fbd4ae0391eeb66f88f5 (patch)
tree4f9b493a2a7c30ab3247ec41b954dd8d94e30030 /scripts
parentUpdate node modules (#31) (diff)
downloadferdium-app-148b852d6ee1cfd60959fbd4ae0391eeb66f88f5.tar.gz
ferdium-app-148b852d6ee1cfd60959fbd4ae0391eeb66f88f5.tar.zst
ferdium-app-148b852d6ee1cfd60959fbd4ae0391eeb66f88f5.zip
Upgrade 'sqlite3'
Add missing dev dependency '@babel/core' [prep for pnpm] Combine 'prebuild' into 'build' script since pre-scripts automagic is not supported by pnpm [cleanup] Use 'pnpm' instead of 'pnpm run' [cleanup] Clean npm cache after cleaning pnpm since pnpm is also managed within npm [cleanup] Delete '~/.electron-gyp' while cleaning
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build-unix.sh8
-rw-r--r--scripts/build-windows.ps115
2 files changed, 14 insertions, 9 deletions
diff --git a/scripts/build-unix.sh b/scripts/build-unix.sh
index 872219a8f..07f9f2f81 100755
--- a/scripts/build-unix.sh
+++ b/scripts/build-unix.sh
@@ -63,13 +63,15 @@ if [ "$CLEAN" != "true" ]; then
63 printf "\n*************** SKIPPING Cleaning ***************\n" 63 printf "\n*************** SKIPPING Cleaning ***************\n"
64else 64else
65 printf "\n*************** Cleaning!!!!!! ***************\n" 65 printf "\n*************** Cleaning!!!!!! ***************\n"
66 npm cache clean --force 66
67 rm -rf ~/.npm ~/.node-gyp ~/.asdf/installs/nodejs/*/.npm/
68 if [[ -s 'pnpm-lock.yaml' ]]; then 67 if [[ -s 'pnpm-lock.yaml' ]]; then
69 pnpm store prune || true # in case the pnpm executable itself is not present 68 pnpm store prune || true # in case the pnpm executable itself is not present
70 rm -rf ~/.pnpm-store ~/.pnpm-state 69 rm -rf ~/.pnpm-store ~/.pnpm-state
71 fi 70 fi
72 71
72 npm cache clean --force
73 rm -rf ~/.npm ~/.node-gyp ~/.electron-gyp ~/.asdf/installs/nodejs/*/.npm/
74
73 git -C recipes clean -fxd # Clean recipes folder/submodule 75 git -C recipes clean -fxd # Clean recipes folder/submodule
74 git clean -fxd # Note: This will blast away the 'recipes' folder if you have symlinked it 76 git clean -fxd # Note: This will blast away the 'recipes' folder if you have symlinked it
75fi 77fi
@@ -125,7 +127,7 @@ printf "\n*************** Building recipes ***************\n"
125# Note: 'recipes' is already using only pnpm - can switch to $BASE_CMD AFTER both repos are using pnpm 127# Note: 'recipes' is already using only pnpm - can switch to $BASE_CMD AFTER both repos are using pnpm
126pushd recipes 128pushd recipes
127pnpm i 129pnpm i
128pnpm run package 130pnpm package
129popd 131popd
130 132
131# ----------------------------------------------------------------------------- 133# -----------------------------------------------------------------------------
diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1
index 3904c1bf9..9d4830059 100644
--- a/scripts/build-windows.ps1
+++ b/scripts/build-windows.ps1
@@ -67,11 +67,9 @@ if ($env:CLEAN -eq "true")
67{ 67{
68 $NPM_PATH = "$USERHOME\.npm" 68 $NPM_PATH = "$USERHOME\.npm"
69 $NODE_GYP = "$USERHOME\.node-gyp" 69 $NODE_GYP = "$USERHOME\.node-gyp"
70 $ELECTRON_GYP = "$USERHOME\.electron-gyp"
70 71
71 Write-Host "Cleaning!" 72 Write-Host "Cleaning!"
72 npm cache clean --force
73 Remove-Item -Path $NPM_PATH -Recurse -ErrorAction SilentlyContinue
74 Remove-Item -Path $NODE_GYP -Recurse -ErrorAction SilentlyContinue
75 73
76 if ( (Test-Path -Path ".\pnpm-lock.yaml") -and (Get-Command -ErrorAction Ignore -Type Application pnpm) ) 74 if ( (Test-Path -Path ".\pnpm-lock.yaml") -and (Get-Command -ErrorAction Ignore -Type Application pnpm) )
77 { 75 {
@@ -80,10 +78,15 @@ if ($env:CLEAN -eq "true")
80 78
81 pnpm store prune 79 pnpm store prune
82 80
83 Remove-Item -Path $PNPM_STORE -Recurse 81 Remove-Item -Path $PNPM_STORE -Recurse -ErrorAction SilentlyContinue
84 Remove-Item -Path $PNPM_STATE -Recurse 82 Remove-Item -Path $PNPM_STATE -Recurse -ErrorAction SilentlyContinue
85 } 83 }
86 84
85 npm cache clean --force
86 Remove-Item -Path $NPM_PATH -Recurse -ErrorAction SilentlyContinue
87 Remove-Item -Path $NODE_GYP -Recurse -ErrorAction SilentlyContinue
88 Remove-Item -Path $ELECTRON_GYP -Recurse -ErrorAction SilentlyContinue
89
87 git -C recipes clean -fxd # Clean recipes folder/submodule 90 git -C recipes clean -fxd # Clean recipes folder/submodule
88 git clean -fxd # Note: This will blast away the 'recipes' folder if you have symlinked it 91 git clean -fxd # Note: This will blast away the 'recipes' folder if you have symlinked it
89} 92}
@@ -151,7 +154,7 @@ Write-Host "\n*************** Building recipes ***************\n"
151# Note: 'recipes' is already using only pnpm - can switch to $BASE_CMD AFTER both repos are using pnpm 154# Note: 'recipes' is already using only pnpm - can switch to $BASE_CMD AFTER both repos are using pnpm
152Push-Location recipes 155Push-Location recipes
153pnpm i 156pnpm i
154pnpm run package 157pnpm package
155Pop-Location 158Pop-Location
156 159
157# ----------------------------------------------------------------------------- 160# -----------------------------------------------------------------------------