Skip to content

Commit

Permalink
CI,make.fsx: use --native-segwit for dotnet pack
Browse files Browse the repository at this point in the history
We use beta version because we use NativeSegwit (0.9 instead of
0.7, like the beta snap).
  • Loading branch information
knocte committed Mar 9, 2024
1 parent 7eba876 commit 9af264b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 16 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,11 @@ jobs:
- name: ownership workaround
run: git config --global --add safe.directory '*'
- name: configure
run: ./configure.sh
run: ./configure.sh --native-segwit
- name: Bump version to beta (because segwit)
run: |
git submodule foreach git fetch --all && git submodule sync --recursive && git submodule update --init --recursive
dotnet fsi ./scripts/beta_bump.fsx
- name: pack&push
run: make push

Expand Down Expand Up @@ -582,7 +586,7 @@ jobs:
- name: Bump snap version
run: |
git submodule foreach git fetch --all && git submodule sync --recursive && git submodule update --init --recursive
dotnet fsi ./scripts/snap_bump.fsx
dotnet fsi ./scripts/beta_bump.fsx
- name: Generate snap package
run: |
Expand Down
File renamed without changes.
41 changes: 27 additions & 14 deletions scripts/make.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,19 +174,7 @@ let PrintNugetVersion () =
Console.Out.Flush()
failwith "nuget process' output contained errors ^"

let BuildSolutionOrProject
(buildToolAndBuildArg: string*string)
(file: FileInfo)
(binaryConfig: BinaryConfig)
(maybeConstant: Option<string>)
(extraOptions: string)
=
#if LEGACY_FRAMEWORK
NugetRestore file
#endif

let buildTool,buildArg = buildToolAndBuildArg

let GetBuildFlags (buildTool: string) (binaryConfig) (maybeConstant: Option<string>) =
let configOption =
if buildTool.StartsWith "dotnet" then
sprintf "--configuration %s" (binaryConfig.ToString())
Expand Down Expand Up @@ -235,6 +223,24 @@ let BuildSolutionOrProject
sprintf "%s -property:DefineConstants=\\\"%s\\\"" configOption (String.Join(semiColon, defineConstants))
else
configOption

configOptions

let BuildSolutionOrProject
(buildToolAndBuildArg: string*string)
(file: FileInfo)
(binaryConfig: BinaryConfig)
(maybeConstant: Option<string>)
(extraOptions: string)
=
#if LEGACY_FRAMEWORK
NugetRestore file
#endif

let buildTool,buildArg = buildToolAndBuildArg

let configOptions = GetBuildFlags buildTool binaryConfig maybeConstant

let buildArgs = sprintf "%s %s %s %s"
buildArg
file.FullName
Expand Down Expand Up @@ -687,10 +693,17 @@ match maybeTarget with
let backendDir = GetPathToBackend()
let backendProj = Path.Combine(backendDir.FullName, BACKEND_LIB + ".fsproj")

let binaryConfig =
if isTag then
BinaryConfig.Release
else
BinaryConfig.Debug
let buildFlags = GetBuildFlags "dotnet" binaryConfig None
let allBuildFlags = sprintf "%s -property:Version=%s" buildFlags nugetVersion
Process.Execute(
{
Command = "dotnet"
Arguments = sprintf "pack -property:Version=%s %s" nugetVersion backendProj
Arguments = sprintf "pack %s %s" allBuildFlags backendProj
},
Echo.All
).UnwrapDefault() |> ignore<string>
Expand Down

0 comments on commit 9af264b

Please sign in to comment.