Skip to content

Commit 6013685

Browse files
committed
Move F# scripts to scripts folder
1 parent b6fce9f commit 6013685

File tree

10 files changed

+28
-16
lines changed

10 files changed

+28
-16
lines changed

.github/actions/create/action.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ inputs:
88
source_directory:
99
description: "Directory containing the source code (e.g. ./src)"
1010
required: true
11+
script_directory:
12+
description: "Directory containing the script code (e.g. ./scripts)"
13+
required: true
1114
shell:
1215
description: "Shell to use"
1316
required: true
@@ -24,12 +27,12 @@ runs:
2427
2528
- name: Compile native library
2629
run: dotnet fsi GenerateGirTestLib.fsx
27-
working-directory: ${{ inputs.source_directory }}
30+
working-directory: ${{ inputs.script_directory }}
2831
shell: ${{ inputs.shell }}
2932

3033
- name: Call generator
3134
run: dotnet fsi GenerateLibs.fsx GirTest-0.1.gir
32-
working-directory: ${{ inputs.source_directory }}
35+
working-directory: ${{ inputs.script_directory }}
3336
shell: ${{ inputs.shell }}
3437

3538
- name: Build complete solution

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
with:
5555
configuration: ${{ env.configuration }}
5656
source_directory: './src'
57+
script_directory: './scripts'
5758
shell: bash
5859

5960
build_windows:
@@ -92,6 +93,7 @@ jobs:
9293
with:
9394
configuration: ${{ env.configuration }}
9495
source_directory: './src'
96+
script_directory: './scripts'
9597
shell: msys2 {0}
9698

9799
build_linux:
@@ -124,6 +126,7 @@ jobs:
124126
with:
125127
configuration: ${{ env.configuration }}
126128
source_directory: './src'
129+
script_directory: './scripts'
127130
shell: bash
128131

129132
- name: Verify code format

docs/docs/build.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ To generate the bindings locally execute the following commands in a terminal. M
44

55
```sh
66
$ git clone --recursive https://github.com/gircore/gir.core.git
7-
$ cd gir.core/src
7+
$ cd gir.core/scripts
88
$ dotnet fsi GenerateLibs.fsx
9+
$ cd ../src
910
$ dotnet build GirCore.Libs.slnf
1011
```
1112

12-
If you want to clean the [Libs folder](https://github.com/gircore/gir.core/tree/main/src/Libs) of all generated files run:
13+
If you want to clean the [Libs folder](https://github.com/gircore/gir.core/tree/main/src/Libs) of all generated files run inside the scripts folder:
1314

1415
$ dotnet fsi CleanLibs.fsx
1516

readme.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,13 @@ To generate the bindings locally execute the following commands in a terminal. M
6060

6161
```sh
6262
$ git clone --recursive https://github.com/gircore/gir.core.git
63-
$ cd gir.core/src
63+
$ cd gir.core/scripts
6464
$ dotnet fsi GenerateLibs.fsx
65+
$ cd ../src
6566
$ dotnet build GirCore.Libs.slnf
6667
```
6768

68-
If you want to clean the [Libs folder](src/Libs) of all generated files run:
69+
If you want to clean the [Libs folder](src/Libs) of all generated files run in the scripts folder:
6970

7071
$ dotnet fsi CleanLibs.fsx
7172

scripts/CleanLibs.fsx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#r "nuget: SimpleExec, 8.0.0"
2+
open SimpleExec
3+
4+
Command.Run(
5+
name = "dotnet",
6+
args = "run --project Generation/GirTool/GirTool.csproj -- clean Libs",
7+
workingDirectory = "../src"
8+
)

src/GenerateGirTestLib.fsx scripts/GenerateGirTestLib.fsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
open SimpleExec
33

44
let libSrcDir = System.IO.Path.Combine(
5-
System.IO.Directory.GetCurrentDirectory(), "Native", "GirTestLib")
5+
System.IO.Directory.GetCurrentDirectory(), "..", "src", "Native", "GirTestLib")
66
let libBuildDir = System.IO.Path.Combine(libSrcDir, "builddir")
77
let libInstallDir = System.IO.Path.Combine(libSrcDir, "installdir")
88

File renamed without changes.
File renamed without changes.

src/CleanLibs.fsx

-4
This file was deleted.

src/GirCore.sln

+5-5
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionIt
6868
ProjectSection(SolutionItems) = preProject
6969
..\.editorconfig = ..\.editorconfig
7070
..\.gitignore = ..\.gitignore
71-
CleanLibs.fsx = CleanLibs.fsx
72-
GenerateLibs.fsx = GenerateLibs.fsx
7371
NugetReadme.md = NugetReadme.md
7472
..\readme.md = ..\readme.md
75-
GenerateGirTestLib.fsx = GenerateGirTestLib.fsx
7673
EndProjectSection
7774
EndProject
7875
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{0D9C5C7E-F81B-4E0E-B203-22D558E6D7F1}"
@@ -278,9 +275,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiagnosticAnalyzerTestProje
278275
EndProject
279276
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GObject-2.0.Integration.Tests", "Tests\Libs\GObject-2.0.Integration.Tests\GObject-2.0.Integration.Tests.csproj", "{871C0013-F1C0-429F-A8DF-FB737DFA287E}"
280277
EndProject
281-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{FF81E529-6B9E-4A31-9C4C-F664FCE2FEE1}"
278+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{FF81E529-6B9E-4A31-9C4C-F664FCE2FEE1}"
282279
ProjectSection(SolutionItems) = preProject
283-
..\build\GetVersion.fsx = ..\build\GetVersion.fsx
280+
..\scripts\GetVersion.fsx = ..\scripts\GetVersion.fsx
281+
..\scripts\CleanLibs.fsx = ..\scripts\CleanLibs.fsx
282+
..\scripts\GenerateGirTestLib.fsx = ..\scripts\GenerateGirTestLib.fsx
283+
..\scripts\GenerateLibs.fsx = ..\scripts\GenerateLibs.fsx
284284
EndProjectSection
285285
EndProject
286286
Global

0 commit comments

Comments
 (0)