Skip to content

Commit 08b2d46

Browse files
authored
Merge pull request #5 from alma-oss/feature/adjust-repo
Move repository
2 parents 5e4df0d + 8633e13 commit 08b2d46

File tree

12 files changed

+50
-101
lines changed

12 files changed

+50
-101
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111

1212
permissions:
1313
contents: read
14-
packages: write
1514

1615
steps:
1716
- uses: actions/checkout@v4
@@ -21,20 +20,8 @@ jobs:
2120
with:
2221
dotnet-version: 9.x
2322

24-
- name: Generate token
25-
id: generate_token
26-
uses: almacareer/dex-github-app-token@v1
27-
with:
28-
app_id: ${{ secrets.PRC_ACTIONS_INTERNAL_APPID }}
29-
installation_id: ${{ secrets.PRC_ACTIONS_INTERNAL_INSTALLATION_ID }}
30-
private_key: ${{ secrets.PRC_ACTIONS_INTERNAL_KEY }}
31-
32-
- name: Publish package
23+
- name: Publish to NuGet.org
3324
env:
34-
PRIVATE_FEED_USER: ${{ github.repository_owner }}
35-
PRIVATE_FEED_PASS: ${{ secrets.GITHUB_TOKEN }}
36-
NUGET_SERVER_TOKEN: ${{ steps.generate_token.outputs.token }}
37-
NUGET_SERVER_ORGANIZATION: ${{ github.repository_owner }}
38-
NUGET_SERVER_REPOSITORY: "prc-nuget-server"
25+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
3926
DOTNET_ROLL_FORWARD: latestMajor
40-
run: ./build.sh -t publish
27+
run: ./build.sh -t publish no-lint

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
PRIVATE_FEED_USER: ${{ github.repository_owner }}
2929
PRIVATE_FEED_PASS: ${{ secrets.GITHUB_TOKEN }}
3030
DOTNET_ROLL_FORWARD: latestMajor
31-
run: ${{ matrix.os.run }} -t tests
31+
run: ${{ matrix.os.run }} -t tests no-lint

ApplicationStatus.fsproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
<OutputType>Library</OutputType>
77
<PackageId>Alma.ApplicationStatus</PackageId>
88
<Version>6.1.0</Version>
9-
<RepositoryUrl>https://github.com/almacareer/prc-fapplicationStatus.git</RepositoryUrl>
10-
<PackageProjectUrl>https://github.com/almacareer/prc-fapplicationStatus</PackageProjectUrl>
9+
<Authors>Almacareer</Authors>
10+
<Description>Types for an common Application status representation.</Description>
11+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
12+
<RepositoryUrl>https://github.com/alma-oss/fapplicationStatus.git</RepositoryUrl>
13+
<PackageProjectUrl>https://github.com/alma-oss/fapplicationStatus</PackageProjectUrl>
1114
</PropertyGroup>
1215

1316
<ItemGroup>

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
<!-- There is always Unreleased section on the top. Subsections (Add, Changed, Fix, Removed) should be Add as needed. -->
44
## Unreleased
5+
- Move repository
6+
- Remove `Nomad` fields
57

68
## 6.1.0 - 2025-03-17
79
- Update dependencies

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
### The MIT License (MIT) ###
2+
3+
Copyright (c) Alma Career Czechia s.r.o.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
Application Status
22
==================
33

4-
> Types for an common Application status representation used in LMC.
4+
[![NuGet](https://img.shields.io/nuget/v/Alma.ApplicationStatus.svg)](https://www.nuget.org/packages/Alma.ApplicationStatus)
5+
[![NuGet Downloads](https://img.shields.io/nuget/dt/Alma.ApplicationStatus.svg)](https://www.nuget.org/packages/Alma.ApplicationStatus)
6+
[![Tests](https://github.com/alma-oss/fapplicationStatus/actions/workflows/tests.yaml/badge.svg)](https://github.com/alma-oss/fapplicationStatus/actions/workflows/tests.yaml)
57

6-
## Install
7-
8-
Add following into `paket.dependencies`
9-
```
10-
source https://nuget.pkg.github.com/almacareer/index.json username: "%PRIVATE_FEED_USER%" password: "%PRIVATE_FEED_PASS%"
11-
# LMC Nuget dependencies:
12-
nuget Alma.ApplicationStatus
13-
```
8+
> Types for an common Application status representation.
149
15-
NOTE: For local development, you have to create ENV variables with your github personal access token.
16-
```sh
17-
export PRIVATE_FEED_USER='{GITHUB USERNANME}'
18-
export PRIVATE_FEED_PASS='{TOKEN}' # with permissions: read:packages
19-
```
10+
## Install
2011

2112
Add following into `paket.references`
2213
```
@@ -34,8 +25,6 @@ type CurrentApplication = {
3425
Dependencies: Dependencies
3526
ServiceStatus: ServiceStatus
3627
LoggerFactory: ILoggerFactory
37-
NomadJobName: NomadJobName
38-
NomadAllocationId: NomadAllocationId
3928
DockerImageVersion: DockerImageVersion
4029
}
4130
@@ -59,10 +48,6 @@ let createStatus (currentApplication: CurrentApplication) =
5948
6049
interface ApplicationStatusFeature.IDockerApplication with
6150
member __.DockerImageVersion = currentApplication.DockerImageVersion
62-
63-
interface ApplicationStatusFeature.INomadApplication with
64-
member __.NomadJobName = currentApplication.NomadJobName
65-
member __.NomadAllocationId = currentApplication.NomadAllocationId
6651
}
6752
```
6853

build/Build.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ let main args =
2020
Targets.init {
2121
Project = {
2222
Name = "Alma.ApplicationStatus"
23-
Summary = "Types for an common Application status representation used in LMC."
23+
Summary = "Types for an common Application status representation."
2424
Git = Git.init ()
2525
}
2626
Specs =
2727
Spec.defaultLibrary
28-
|> Spec.mapLibrary (fun library -> { library with NugetApi = NugetApi.Organization "almacareer" })
28+
|> Spec.mapLibrary (fun library -> { library with NugetApi = NugetApi.KeyInEnvironment "NUGET_API_KEY" })
2929
}
3030

3131
args |> Args.run

paket.dependencies

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ source https://api.nuget.org/v3/index.json
44
nuget FSharp.Core ~> 9.0
55
nuget FSharp.Data ~> 6.0
66

7-
source https://nuget.pkg.github.com/almacareer/index.json username: "%PRIVATE_FEED_USER%" password: "%PRIVATE_FEED_PASS%"
8-
# LMC Nuget dependencies:
9-
nuget Alma.EnvironmentModel ~> 8.1
10-
nuget Alma.ServiceIdentification ~> 10.0
7+
nuget Alma.EnvironmentModel ~> 9.0
8+
nuget Alma.ServiceIdentification ~> 10.1
119

1210
nuget Expecto
1311
nuget YoloDev.Expecto.TestSdk

paket.lock

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
RESTRICTION: == net9.0
22
NUGET
3-
remote: https://nuget.pkg.github.com/almacareer/index.json
4-
Alma.EnvironmentModel (8.1.0)
5-
Alma.ErrorHandling (>= 10.0 < 11.0)
6-
Alma.ServiceIdentification (>= 10.0 < 11.0)
7-
FSharp.Core (>= 9.0.201 < 10.0)
8-
Alma.ErrorHandling (10.0.0)
9-
FSharp.Core (>= 9.0.201 < 10.0)
10-
Alma.ServiceIdentification (10.0.0)
11-
FSharp.Core (>= 9.0.201 < 10.0)
123
remote: https://api.nuget.org/v3/index.json
4+
Alma.EnvironmentModel (9.1)
5+
Alma.ServiceIdentification (>= 10.1 < 11.0)
6+
Feather.ErrorHandling (>= 1.0 < 2.0)
7+
FSharp.Core (>= 9.0.303 < 10.0)
8+
Alma.ServiceIdentification (10.1)
9+
FSharp.Core (>= 9.0.201 < 10.0)
1310
Expecto (10.2.2)
1411
FSharp.Core (>= 7.0.200)
1512
Mono.Cecil (>= 0.11.4 < 1.0)
16-
FSharp.Core (9.0.201)
13+
Feather.ErrorHandling (1.0)
14+
FSharp.Core (>= 9.0.201 < 10.0)
15+
FSharp.Core (9.0.303)
1716
FSharp.Data (6.6)
1817
FSharp.Core (>= 6.0.1)
1918
FSharp.Data.Csv.Core (>= 6.6)

src/ApplicationStatus.fs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ type GitRepository = GitRepository of string
1313

1414
type DockerImageVersion = DockerImageVersion of string
1515

16-
type NomadJobName = NomadJobName of string
17-
type NomadAllocationId = NomadAllocationId of string
18-
1916
[<RequireQualifiedAccess>]
2017
module GitBranch =
2118
let value (GitBranch value) = value
@@ -36,16 +33,6 @@ module DockerImageVersion =
3633
let value (DockerImageVersion value) = value
3734
let empty = DockerImageVersion ""
3835

39-
[<RequireQualifiedAccess>]
40-
module NomadJobName =
41-
let value (NomadJobName value) = value
42-
let empty = NomadJobName ""
43-
44-
[<RequireQualifiedAccess>]
45-
module NomadAllocationId =
46-
let value (NomadAllocationId value) = value
47-
let empty = NomadAllocationId ""
48-
4936
//
5037
// Application Status Interfaces
5138
//
@@ -64,10 +51,6 @@ module ApplicationStatusFeature =
6451
type IDockerApplication =
6552
abstract member DockerImageVersion: DockerImageVersion
6653

67-
type INomadApplication =
68-
abstract member NomadJobName: NomadJobName
69-
abstract member NomadAllocationId: NomadAllocationId
70-
7154
module internal Matching =
7255
let (|IsCurrentApplication|_|): obj -> ICurrentApplication option = box >> function
7356
| :? ICurrentApplication as currentApplication -> Some currentApplication
@@ -81,10 +64,6 @@ module ApplicationStatusFeature =
8164
| :? IDockerApplication as dockerAppliation -> Some dockerAppliation
8265
| _ -> None
8366

84-
let (|IsNomadApplication|_|): obj -> INomadApplication option = box >> function
85-
| :? INomadApplication as nomadApplication -> Some nomadApplication
86-
| _ -> None
87-
8867
//
8968
// Application Status
9069
//
@@ -102,8 +81,6 @@ type ApplicationStatus = {
10281
[<XmlElement("sourceRevision")>] SourceRevision: string
10382
[<XmlElement("repository")>] Repository: string
10483
[<XmlElement("hostName")>] HostName: string
105-
[<XmlElement("nomadJobName")>] NomadJobName: string
106-
[<XmlElement("nomadAllocId")>] NomadAllocId: string
10784
}
10885

10986
[<RequireQualifiedAccess>]
@@ -148,13 +125,4 @@ module ApplicationStatus =
148125
| _ -> ""
149126

150127
HostName = try Dns.GetHostName() with _ -> ""
151-
152-
NomadJobName =
153-
match application with
154-
| IsNomadApplication nomadApplication -> nomadApplication.NomadJobName |> NomadJobName.value
155-
| _ -> ""
156-
NomadAllocId =
157-
match application with
158-
| IsNomadApplication nomadApplication -> nomadApplication.NomadAllocationId |> NomadAllocationId.value
159-
| _ -> ""
160128
}

0 commit comments

Comments
 (0)