Skip to content

Commit 2a87a0d

Browse files
Try building shipyard with shipyard
1 parent 04e1225 commit 2a87a0d

6 files changed

Lines changed: 63 additions & 23 deletions

File tree

.github/actions/setup-env/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ runs:
1313
shell: bash
1414
run: |
1515
sudo apt-get install -y rpm
16+
dotnet tool install --global shipyard
1617
1718
- name: Print .NET version and SDKs
1819
shell: bash
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: .NET Build
2+
3+
on:
4+
push:
5+
branches:
6+
- '*'
7+
pull_request:
8+
branches:
9+
- '*'
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
name: Build & Test
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v6
21+
22+
- name: Setup Environment
23+
uses: ./.github/actions/setup-env
24+
25+
- name: Build Packages
26+
run: |
27+
shipyard --config ./shipyard.json --output ./publish/
28+
29+
- name: Upload Build Artifacts
30+
uses: actions/upload-artifact@v6
31+
with:
32+
name: 'build.zip'
33+
path: ./publish/*.rpm

Shipyard.Demo/shipyard.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
{
2-
"$schema": "../shipyard.schema.json",
2+
"$schema": "https://raw.githubusercontent.com/CorruptComputer/Shipyard/refs/heads/develop/shipyard.schema.json",
33
"projectFile": "./Shipyard.Demo.csproj",
44
"framework": "net10.0",
55
"runtimes": [
66
"linux-x64"
77
],
88
"version": "0.0.1",
9-
"author": "My Company",
9+
"author": "Nickolas Gupton",
1010
"license": "MIT",
1111
"repositoryUrl": "https://github.com/CorruptComputer/Shipyard",
1212
"formatConfigs": [
1313
{
1414
"format": "rpm",
1515
"packageName": "Shipyard.Demo",
1616
"release": 1,
17-
"prefix": "/usr/local/bin/Shipyard.Demo",
1817
"provides": [],
1918
"dependsOn": [
2019
"dotnet-runtime-10.0"

Shipyard/Models/ProjectConfiguration/FormatConfiguration/RpmConfig.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ public record RpmConfig : FormatConfigurationBase
2222
[JsonPropertyName("release")]
2323
public int? Release { get; set; }
2424

25-
/// <summary>
26-
/// The installation prefix directory.
27-
/// </summary>
28-
[JsonPropertyName("prefix")]
29-
public string? Prefix { get; set; }
30-
3125
/// <summary>
3226
/// The dependencies which this package provides.
3327
/// </summary>
@@ -56,11 +50,9 @@ public record RpmConfig : FormatConfigurationBase
5650
// Should NOT be used for full validation of config correctness
5751
[MemberNotNullWhen(true, nameof(PackageName))]
5852
[MemberNotNullWhen(true, nameof(Release))]
59-
[MemberNotNullWhen(true, nameof(Prefix))]
6053
internal bool HasNonNullRequiredValues
6154
=> !string.IsNullOrWhiteSpace(PackageName)
62-
&& Release.HasValue
63-
&& !string.IsNullOrWhiteSpace(Prefix);
55+
&& Release.HasValue;
6456

6557
internal override bool Validate(TextWriter errorWriter)
6658
{

Shipyard/shipyard.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/CorruptComputer/Shipyard/refs/heads/develop/shipyard.schema.json",
3+
"projectFile": "./Shipyard.csproj",
4+
"framework": "net10.0",
5+
"runtimes": [
6+
"linux-x64"
7+
],
8+
"version": "0.0.1",
9+
"author": "Nickolas Gupton",
10+
"license": "MIT",
11+
"repositoryUrl": "https://github.com/CorruptComputer/Shipyard",
12+
"formatConfigs": [
13+
{
14+
"format": "rpm",
15+
"packageName": "Shipyard",
16+
"release": 1,
17+
"provides": [],
18+
"dependsOn": [
19+
"dotnet-runtime-10.0",
20+
"dotnet-sdk-10.0",
21+
"rpm-build"
22+
]
23+
}
24+
]
25+
}

shipyard.schema.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@
9393
"required": [
9494
"format",
9595
"packageName",
96-
"release",
97-
"prefix"
96+
"release"
9897
],
9998
"additionalProperties": false,
10099
"properties": {
@@ -112,15 +111,6 @@
112111
"description": "Release number (incremented for rebuilds of the same version)",
113112
"minimum": 1
114113
},
115-
"prefix": {
116-
"type": "string",
117-
"description": "Installation prefix directory",
118-
"examples": [
119-
"/opt/myapp",
120-
"/usr/local",
121-
"/usr"
122-
]
123-
},
124114
"provides": {
125115
"type": "array",
126116
"description": "The dependencies which this package provides.",

0 commit comments

Comments
 (0)