diff options
-rw-r--r-- | package.json | 1 | ||||
m--------- | recipes | 0 | ||||
-rwxr-xr-x | scripts/build-unix.sh | 9 | ||||
-rw-r--r-- | scripts/build-windows.ps1 | 39 |
4 files changed, 8 insertions, 41 deletions
diff --git a/package.json b/package.json index a47b9c8..afebb33 100644 --- a/package.json +++ b/package.json | |||
@@ -19,6 +19,7 @@ | |||
19 | "prepare": "is-ci || husky install", | 19 | "prepare": "is-ci || husky install", |
20 | "dev": "cross-env-shell ENV_PATH=.env.development node ace serve --watch", | 20 | "dev": "cross-env-shell ENV_PATH=.env.development node ace serve --watch", |
21 | "migrate": "cross-env-shell ENV_PATH=.env.development node ace migration:run", | 21 | "migrate": "cross-env-shell ENV_PATH=.env.development node ace migration:run", |
22 | "refresh": "cross-env-shell ENV_PATH=.env.development node ace migration:refresh", | ||
22 | "status": "cross-env-shell ENV_PATH=.env.development node ace migration:status", | 23 | "status": "cross-env-shell ENV_PATH=.env.development node ace migration:status", |
23 | "build": "node ace build --production", | 24 | "build": "node ace build --production", |
24 | "start": "cross-env-shell ENV_PATH=.env node build/server.js", | 25 | "start": "cross-env-shell ENV_PATH=.env node build/server.js", |
diff --git a/recipes b/recipes | |||
Subproject 3f3e7be9487380694e008d1342a0163bd2e80da | Subproject f6c31f00415ad0f0933f07eb3a3f23f4e4cf880 | ||
diff --git a/scripts/build-unix.sh b/scripts/build-unix.sh index 94720aa..f9e020d 100755 --- a/scripts/build-unix.sh +++ b/scripts/build-unix.sh | |||
@@ -112,12 +112,11 @@ popd | |||
112 | pnpm i | 112 | pnpm i |
113 | pnpm prepare | 113 | pnpm prepare |
114 | pnpm lint | 114 | pnpm lint |
115 | # TODO: Uncomment after fixing tests | 115 | pnpm test |
116 | # pnpm test | ||
117 | 116 | ||
118 | # ----------------------------------------------------------------------------- | 117 | # ----------------------------------------------------------------------------- |
119 | printf "\n*************** Building app ***************\n" | 118 | printf "\n*************** Starting app ***************\n" |
120 | node ace migration:refresh | 119 | pnpm refresh |
121 | pnpm start --dev | 120 | pnpm dev |
122 | 121 | ||
123 | printf "\n*************** App successfully stopped! ***************\n" | 122 | printf "\n*************** App successfully stopped! ***************\n" |
diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 index 71b27b8..c22e033 100644 --- a/scripts/build-windows.ps1 +++ b/scripts/build-windows.ps1 | |||
@@ -100,38 +100,6 @@ if ([System.Version]$ACTUAL_PYTHON_VERSION -ne [System.Version]$EXPECTED_PYTHON_ | |||
100 | expected: [$EXPECTED_PYTHON_VERSION] | 100 | expected: [$EXPECTED_PYTHON_VERSION] |
101 | actual : [$ACTUAL_PYTHON_VERSION]" | 101 | actual : [$ACTUAL_PYTHON_VERSION]" |
102 | } | 102 | } |
103 | |||
104 | # Check MSVS Tools through MSVS_VERSION | ||
105 | $EXPECTED_MSVST_VERSION = @("2019","2022") | ||
106 | $NPM_CONFIG_MSVS_VERSION = npm config get msvs_version | ||
107 | if((-not $NPM_CONFIG_MSVS_VERSION) -or -not ($EXPECTED_MSVST_VERSION -contains $NPM_CONFIG_MSVS_VERSION)){ | ||
108 | Write-Host "Your Microsoft Visual Studio Tools isn't set properly or it's not the right version! | ||
109 | Checking your version..." | ||
110 | |||
111 | # TODO: Implement path for ARM machines | ||
112 | $MSVS_REG_PATH = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64" | ||
113 | |||
114 | if(-not (Test-Path -Path $MSVS_REG_PATH)){ | ||
115 | fail_with_docs "You don't have the Microsoft Visual Studio Tools installed!" | ||
116 | } | ||
117 | |||
118 | $MSVS_VERSION = [int]((Get-ItemProperty -Path $MSVS_REG_PATH).Version.substring(4, 2)) | ||
119 | switch($MSVS_VERSION) { | ||
120 | { $MSVS_VERSION -ge 30 } {$ACTUAL_MSVST_VERSION = "2022"} | ||
121 | { ($MSVS_VERSION -ge 20) -and ($MSVS_VERSION -le 29) } {$ACTUAL_MSVST_VERSION = "2019"} | ||
122 | { $MSVS_VERSION -lt 20 } {$ACTUAL_MSVST_VERSION = "2017 or lower"} | ||
123 | } | ||
124 | |||
125 | if (-not ($EXPECTED_MSVST_VERSION -contains $ACTUAL_MSVST_VERSION)) { | ||
126 | fail_with_docs "You are not running the expected version of MSVS Tools! | ||
127 | expected: [$EXPECTED_MSVST_VERSION] | ||
128 | actual : [$ACTUAL_MSVST_VERSION]" | ||
129 | } | ||
130 | |||
131 | Write-Host "Changing your msvs_version on npm to [$ACTUAL_MSVST_VERSION]" | ||
132 | npm config set msvs_version $ACTUAL_MSVST_VERSION | ||
133 | } | ||
134 | |||
135 | # Check pnpm version | 103 | # Check pnpm version |
136 | $EXPECTED_PNPM_VERSION = (Get-Content .\recipes\package.json | ConvertFrom-Json).engines.pnpm | 104 | $EXPECTED_PNPM_VERSION = (Get-Content .\recipes\package.json | ConvertFrom-Json).engines.pnpm |
137 | $ACTUAL_PNPM_VERSION = Get-Command pnpm --version -ErrorAction SilentlyContinue # in case the pnpm executable itself is not present | 105 | $ACTUAL_PNPM_VERSION = Get-Command pnpm --version -ErrorAction SilentlyContinue # in case the pnpm executable itself is not present |
@@ -162,12 +130,11 @@ Pop-Location | |||
162 | & pnpm i | 130 | & pnpm i |
163 | & pnpm prepare | 131 | & pnpm prepare |
164 | & pnpm lint | 132 | & pnpm lint |
165 | # TODO: Uncomment after fixing tests | 133 | & pnpm test |
166 | # & pnpm test | ||
167 | 134 | ||
168 | # ----------------------------------------------------------------------------- | 135 | # ----------------------------------------------------------------------------- |
169 | Write-Host "*************** Starting app ***************" | 136 | Write-Host "*************** Starting app ***************" |
170 | & node ace migration:refresh | 137 | & pnpm refresh |
171 | & pnpm start --dev | 138 | & pnpm dev |
172 | 139 | ||
173 | Write-Host "*************** App successfully stopped! ***************" | 140 | Write-Host "*************** App successfully stopped! ***************" |