Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove python references and MSVS #94

Merged
merged 3 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"prepare": "is-ci || husky install",
"dev": "cross-env-shell ENV_PATH=.env.development node ace serve --watch",
"migrate": "cross-env-shell ENV_PATH=.env.development node ace migration:run",
"refresh": "cross-env-shell ENV_PATH=.env.development node ace migration:refresh",
"status": "cross-env-shell ENV_PATH=.env.development node ace migration:status",
"build": "node ace build --production",
"start": "cross-env-shell ENV_PATH=.env node build/server.js",
Expand Down
2 changes: 1 addition & 1 deletion recipes
9 changes: 4 additions & 5 deletions scripts/build-unix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,11 @@ popd
pnpm i
pnpm prepare
pnpm lint
# TODO: Uncomment after fixing tests
# pnpm test
pnpm test

# -----------------------------------------------------------------------------
printf "\n*************** Building app ***************\n"
node ace migration:refresh
pnpm start --dev
printf "\n*************** Starting app ***************\n"
pnpm refresh
pnpm dev

printf "\n*************** App successfully stopped! ***************\n"
39 changes: 3 additions & 36 deletions scripts/build-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -100,38 +100,6 @@ if ([System.Version]$ACTUAL_PYTHON_VERSION -ne [System.Version]$EXPECTED_PYTHON_
expected: [$EXPECTED_PYTHON_VERSION]
actual : [$ACTUAL_PYTHON_VERSION]"
}

# Check MSVS Tools through MSVS_VERSION
$EXPECTED_MSVST_VERSION = @("2019","2022")
$NPM_CONFIG_MSVS_VERSION = npm config get msvs_version
if((-not $NPM_CONFIG_MSVS_VERSION) -or -not ($EXPECTED_MSVST_VERSION -contains $NPM_CONFIG_MSVS_VERSION)){
Write-Host "Your Microsoft Visual Studio Tools isn't set properly or it's not the right version!
Checking your version..."

# TODO: Implement path for ARM machines
$MSVS_REG_PATH = "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\X64"

if(-not (Test-Path -Path $MSVS_REG_PATH)){
fail_with_docs "You don't have the Microsoft Visual Studio Tools installed!"
}

$MSVS_VERSION = [int]((Get-ItemProperty -Path $MSVS_REG_PATH).Version.substring(4, 2))
switch($MSVS_VERSION) {
{ $MSVS_VERSION -ge 30 } {$ACTUAL_MSVST_VERSION = "2022"}
{ ($MSVS_VERSION -ge 20) -and ($MSVS_VERSION -le 29) } {$ACTUAL_MSVST_VERSION = "2019"}
{ $MSVS_VERSION -lt 20 } {$ACTUAL_MSVST_VERSION = "2017 or lower"}
}

if (-not ($EXPECTED_MSVST_VERSION -contains $ACTUAL_MSVST_VERSION)) {
fail_with_docs "You are not running the expected version of MSVS Tools!
expected: [$EXPECTED_MSVST_VERSION]
actual : [$ACTUAL_MSVST_VERSION]"
}

Write-Host "Changing your msvs_version on npm to [$ACTUAL_MSVST_VERSION]"
npm config set msvs_version $ACTUAL_MSVST_VERSION
}

# Check pnpm version
$EXPECTED_PNPM_VERSION = (Get-Content .\recipes\package.json | ConvertFrom-Json).engines.pnpm
$ACTUAL_PNPM_VERSION = Get-Command pnpm --version -ErrorAction SilentlyContinue # in case the pnpm executable itself is not present
Expand Down Expand Up @@ -162,12 +130,11 @@ Pop-Location
& pnpm i
& pnpm prepare
& pnpm lint
# TODO: Uncomment after fixing tests
# & pnpm test
& pnpm test

# -----------------------------------------------------------------------------
Write-Host "*************** Starting app ***************"
& node ace migration:refresh
& pnpm start --dev
& pnpm refresh
& pnpm dev

Write-Host "*************** App successfully stopped! ***************"
Loading