fix: Switch to bun and fix ci
This commit is contained in:
@@ -18,7 +18,7 @@ let versionFile = Path.getFullName ".version"
|
||||
Target.create "Clean" (fun _ -> Shell.cleanDir deployPath)
|
||||
|
||||
Target.create "InstallClient" (fun _ ->
|
||||
run npm "install" "."
|
||||
run bun "install" "."
|
||||
run dotnet "tool restore" "."
|
||||
)
|
||||
|
||||
|
||||
@@ -72,16 +72,16 @@ let createProcess exe arg dir =
|
||||
|> CreateProcess.ensureExitCode
|
||||
|
||||
let dotnet = createProcess "dotnet"
|
||||
let npm =
|
||||
let npmPath =
|
||||
match ProcessUtils.tryFindFileOnPath "npm" with
|
||||
let bun =
|
||||
let bunPath =
|
||||
match ProcessUtils.tryFindFileOnPath "bun" with
|
||||
| Some path -> path
|
||||
| None ->
|
||||
"npm was not found in path. Please install it and make sure it's available from your path. " +
|
||||
"bun was not found in path. Please install it and make sure it's available from your path. " +
|
||||
"See https://safe-stack.github.io/docs/quickstart/#install-pre-requisites for more info"
|
||||
|> failwith
|
||||
|
||||
createProcess npmPath
|
||||
createProcess bunPath
|
||||
|
||||
let run proc arg dir =
|
||||
proc arg dir
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"fable": {
|
||||
"version": "3.7.0",
|
||||
"version": "4.25.0",
|
||||
"commands": [
|
||||
"fable"
|
||||
]
|
||||
],
|
||||
"rollForward": false
|
||||
},
|
||||
"fantomas-tool": {
|
||||
"version": "4.6.4",
|
||||
"fantomas": {
|
||||
"version": "7.0.3",
|
||||
"commands": [
|
||||
"fantomas"
|
||||
]
|
||||
],
|
||||
"rollForward": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,32 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0
|
||||
|
||||
# Add keys and sources lists
|
||||
RUN apt-get update && apt-get install -y ca-certificates gnupg
|
||||
RUN mkdir -p /etc/apt/keyrings
|
||||
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
||||
ENV NODE_MAJOR=20
|
||||
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
||||
# Bun version
|
||||
ARG BUN_INSTALL=/usr/local
|
||||
ARG BUN_VERSION=bun-v1.2.16
|
||||
|
||||
# Install node, 7zip, yarn, git, process tools
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y nodejs p7zip-full git procps ssh-client
|
||||
&& apt-get install -y p7zip-full git procps ssh-client unzip
|
||||
|
||||
# Install Bun
|
||||
RUN set -eux; \
|
||||
curl -fsSL https://bun.sh/install > /usr/local/bin/install-bun \
|
||||
&& chmod +x /usr/local/bin/install-bun \
|
||||
&& /usr/local/bin/install-bun $BUN_VERSION debug-info
|
||||
|
||||
ENV BUN_INSTALL=/usr/local
|
||||
|
||||
# Clean up
|
||||
RUN apt-get autoremove -y \
|
||||
&& apt-get clean -y \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# # Install dotnet tools
|
||||
# RUN dotnet tool install fable -g
|
||||
|
||||
# Trouble brewing
|
||||
RUN rm /etc/ssl/openssl.cnf
|
||||
|
||||
# add dotnet tools to path to pick up fake and paket installation
|
||||
# Add dotnet tools to path to pick up fake and paket installation
|
||||
ENV PATH="/root/.dotnet/tools:${PATH}"
|
||||
|
||||
# Copy endpoint specific user settings into container to specify
|
||||
# .NET Core should be used as the runtime.
|
||||
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
|
||||
COPY settings.vscode.json /root/.vscode-remote/data/Machine/settings.json
|
||||
|
||||
9
.envrc
Normal file
9
.envrc
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# the shebang is ignored, but nice for editors
|
||||
|
||||
if type -P lorri &>/dev/null; then
|
||||
eval "$(lorri direnv)"
|
||||
else
|
||||
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
|
||||
use nix
|
||||
fi
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -15,3 +15,5 @@ deploy
|
||||
.ionide/
|
||||
*.db
|
||||
build.fsx.lock
|
||||
.direnv/
|
||||
result*
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
variables:
|
||||
PROJECT_NAME: oceanbox.geojson
|
||||
SDK_VERSION: 9.0
|
||||
SKIP_TESTS: "true"
|
||||
|
||||
include:
|
||||
- project: oceanbox/gitlab-ci
|
||||
ref: v3
|
||||
file: DotnetPackage.gitlab-ci.yml
|
||||
ref: v4.1
|
||||
file: DotnetPackage.gitlab-ci.yml
|
||||
inputs:
|
||||
project-name: oceanbox.geojson
|
||||
project-dir: .
|
||||
@@ -1,77 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27004.2005
|
||||
MinimumVisualStudioVersion = 15.0.26124.0
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{328C82EA-D5C5-49E0-B3FB-490A12B2A8F6}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
README.md = README.md
|
||||
LICENSE = LICENSE
|
||||
Dockerfile = Dockerfile
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Build", "Build.fsproj", "{A83C8399-5D81-4860-BDF4-591741374D6C}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "src", "src/Oceanbox.GeoJson.fsproj", "{2D24D8A5-68FC-41BC-942D-DE23DB627E54}"
|
||||
EndProject
|
||||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "test", "test\Tests.fsproj", "{56D31E48-612D-4761-B7B7-549C5E5EAA64}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A83C8399-5D81-4860-BDF4-591741374D6C}.Release|x86.Build.0 = Release|Any CPU
|
||||
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Release|x64.Build.0 = Release|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{2D24D8A5-68FC-41BC-942D-DE23DB627E54}.Release|x86.Build.0 = Release|Any CPU
|
||||
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Release|x64.Build.0 = Release|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{56D31E48-612D-4761-B7B7-549C5E5EAA64}.Release|x86.Build.0 = Release|Any CPU
|
||||
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {1385CB14-A9DD-4F05-8508-AB04EF45EAFA}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
15
Oceanbox.GeoJson.slnx
Normal file
15
Oceanbox.GeoJson.slnx
Normal file
@@ -0,0 +1,15 @@
|
||||
<Solution>
|
||||
<Configurations>
|
||||
<Platform Name="Any CPU" />
|
||||
<Platform Name="x64" />
|
||||
<Platform Name="x86" />
|
||||
</Configurations>
|
||||
<Folder Name="/Solution Items/">
|
||||
<File Path="Dockerfile" />
|
||||
<File Path="LICENSE" />
|
||||
<File Path="README.md" />
|
||||
</Folder>
|
||||
<Project Path="Build.fsproj" />
|
||||
<Project Path="src/Oceanbox.GeoJson.fsproj" />
|
||||
<Project Path="test/Tests.fsproj" />
|
||||
</Solution>
|
||||
10009
package-lock.json
generated
10009
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
shell.nix
Normal file
14
shell.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs ? import <nixpkgs> { },
|
||||
}:
|
||||
let
|
||||
dotnet-sdk = pkgs.dotnet-sdk_9;
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = [
|
||||
dotnet-sdk
|
||||
pkgs.bun
|
||||
];
|
||||
|
||||
DOTNET_ROOT = "${dotnet-sdk}/share/dotnet";
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Tests.fs" />
|
||||
|
||||
Reference in New Issue
Block a user