Archived
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
258c86f001 | ||
|
|
6b28dca798 | ||
|
|
a72dfd2e4c | ||
|
|
1370ed6deb |
No files matched your search
@@ -118,3 +118,89 @@ jobs:
|
||||
files: release/*
|
||||
draft: false
|
||||
prerelease: ${{ contains(github.ref, '-') }}
|
||||
|
||||
- name: Get checksums for Homebrew
|
||||
id: checksums
|
||||
run: |
|
||||
cd release
|
||||
echo "macos_arm64_sha=$(grep barn-macos-arm64 SHA256SUMS | awk '{print $1}')" >> $GITHUB_OUTPUT
|
||||
echo "macos_x64_sha=$(grep barn-macos-x64 SHA256SUMS | awk '{print $1}')" >> $GITHUB_OUTPUT
|
||||
echo "linux_arm64_sha=$(grep barn-linux-arm64 SHA256SUMS | awk '{print $1}')" >> $GITHUB_OUTPUT
|
||||
echo "linux_x64_sha=$(grep barn-linux-x64 SHA256SUMS | awk '{print $1}')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout homebrew tap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: samson-media/homebrew-tap
|
||||
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
path: homebrew-tap
|
||||
|
||||
- name: Update Homebrew formula
|
||||
env:
|
||||
VERSION: ${{ steps.version.outputs.version }}
|
||||
MACOS_ARM64_SHA: ${{ steps.checksums.outputs.macos_arm64_sha }}
|
||||
MACOS_X64_SHA: ${{ steps.checksums.outputs.macos_x64_sha }}
|
||||
LINUX_ARM64_SHA: ${{ steps.checksums.outputs.linux_arm64_sha }}
|
||||
LINUX_X64_SHA: ${{ steps.checksums.outputs.linux_x64_sha }}
|
||||
run: |
|
||||
cat > homebrew-tap/Formula/barn.rb << EOF
|
||||
class Barn < Formula
|
||||
desc "Cross-platform job daemon for media processing"
|
||||
homepage "https://github.com/samson-media/barn"
|
||||
version "${VERSION}"
|
||||
license "MIT"
|
||||
|
||||
on_macos do
|
||||
on_arm do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-macos-arm64"
|
||||
sha256 "${MACOS_ARM64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-macos-arm64" => "barn"
|
||||
end
|
||||
end
|
||||
|
||||
on_intel do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-macos-x64"
|
||||
sha256 "${MACOS_X64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-macos-x64" => "barn"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_arm do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-linux-arm64"
|
||||
sha256 "${LINUX_ARM64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-linux-arm64" => "barn"
|
||||
end
|
||||
end
|
||||
|
||||
on_intel do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-linux-x64"
|
||||
sha256 "${LINUX_X64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-linux-x64" => "barn"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "barn", shell_output("#{bin}/barn --version")
|
||||
end
|
||||
end
|
||||
EOF
|
||||
|
||||
- name: Commit and push to Homebrew tap
|
||||
run: |
|
||||
cd homebrew-tap
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git add Formula/barn.rb
|
||||
git diff --staged --quiet || git commit -m "Update barn to ${{ steps.version.outputs.version }}"
|
||||
git push
|
||||
@@ -1,106 +0,0 @@
|
||||
name: Update Homebrew
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
update-homebrew:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get release info
|
||||
id: release
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
# Get checksums from release
|
||||
curl -sL "https://github.com/${{ github.repository }}/releases/download/v${VERSION}/SHA256SUMS" -o SHA256SUMS
|
||||
cat SHA256SUMS
|
||||
|
||||
MACOS_ARM64_SHA=$(grep barn-macos-arm64 SHA256SUMS | awk '{print $1}')
|
||||
MACOS_X64_SHA=$(grep barn-macos-x64 SHA256SUMS | awk '{print $1}')
|
||||
LINUX_ARM64_SHA=$(grep barn-linux-arm64 SHA256SUMS | awk '{print $1}')
|
||||
LINUX_X64_SHA=$(grep barn-linux-x64 SHA256SUMS | awk '{print $1}')
|
||||
|
||||
echo "macos_arm64_sha=$MACOS_ARM64_SHA" >> $GITHUB_OUTPUT
|
||||
echo "macos_x64_sha=$MACOS_X64_SHA" >> $GITHUB_OUTPUT
|
||||
echo "linux_arm64_sha=$LINUX_ARM64_SHA" >> $GITHUB_OUTPUT
|
||||
echo "linux_x64_sha=$LINUX_X64_SHA" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout homebrew tap
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: samson-media/homebrew-tap
|
||||
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
|
||||
path: homebrew-tap
|
||||
|
||||
- name: Update formula
|
||||
env:
|
||||
VERSION: ${{ steps.release.outputs.version }}
|
||||
MACOS_ARM64_SHA: ${{ steps.release.outputs.macos_arm64_sha }}
|
||||
MACOS_X64_SHA: ${{ steps.release.outputs.macos_x64_sha }}
|
||||
LINUX_ARM64_SHA: ${{ steps.release.outputs.linux_arm64_sha }}
|
||||
LINUX_X64_SHA: ${{ steps.release.outputs.linux_x64_sha }}
|
||||
run: |
|
||||
cat > homebrew-tap/Formula/barn.rb << EOF
|
||||
class Barn < Formula
|
||||
desc "Cross-platform job daemon for media processing"
|
||||
homepage "https://github.com/samson-media/barn"
|
||||
version "${VERSION}"
|
||||
license "MIT"
|
||||
|
||||
on_macos do
|
||||
on_arm do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-macos-arm64"
|
||||
sha256 "${MACOS_ARM64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-macos-arm64" => "barn"
|
||||
end
|
||||
end
|
||||
|
||||
on_intel do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-macos-x64"
|
||||
sha256 "${MACOS_X64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-macos-x64" => "barn"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_arm do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-linux-arm64"
|
||||
sha256 "${LINUX_ARM64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-linux-arm64" => "barn"
|
||||
end
|
||||
end
|
||||
|
||||
on_intel do
|
||||
url "https://github.com/samson-media/barn/releases/download/v${VERSION}/barn-linux-x64"
|
||||
sha256 "${LINUX_X64_SHA}"
|
||||
|
||||
def install
|
||||
bin.install "barn-linux-x64" => "barn"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "barn", shell_output("#{bin}/barn --version")
|
||||
end
|
||||
end
|
||||
EOF
|
||||
|
||||
- name: Commit and push
|
||||
run: |
|
||||
cd homebrew-tap
|
||||
git config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git add Formula/barn.rb
|
||||
git commit -m "Update barn to ${{ steps.release.outputs.version }}"
|
||||
git push
|
||||
+23
-1
@@ -5,11 +5,30 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [0.1.4] - 2026-01-22
|
||||
## [0.1.7] - 2026-01-22
|
||||
|
||||
### Fixed
|
||||
- Native image IPC deserialization (IpcMessage reflection config)
|
||||
|
||||
## [0.1.6] - 2026-01-22
|
||||
|
||||
### Added
|
||||
- Intel Mac (x86_64) support
|
||||
|
||||
### Fixed
|
||||
- Homebrew tap now auto-updates on release
|
||||
- Version string now matches release tag
|
||||
|
||||
## [0.1.5] - 2026-01-22
|
||||
|
||||
### Fixed
|
||||
- Version string was hardcoded (broken release)
|
||||
|
||||
## [0.1.4] - 2026-01-22
|
||||
|
||||
### Added
|
||||
- Intel Mac (x86_64) support (release failed)
|
||||
|
||||
## [0.1.3] - 2026-01-22
|
||||
|
||||
### Fixed
|
||||
@@ -48,6 +67,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
|
||||
- Jobs that fail to start now properly transition to FAILED state
|
||||
- Startup errors are written to stderr.log for visibility
|
||||
|
||||
[0.1.7]: https://github.com/samson-media/barn/releases/tag/v0.1.7
|
||||
[0.1.6]: https://github.com/samson-media/barn/releases/tag/v0.1.6
|
||||
[0.1.5]: https://github.com/samson-media/barn/releases/tag/v0.1.5
|
||||
[0.1.4]: https://github.com/samson-media/barn/releases/tag/v0.1.4
|
||||
[0.1.3]: https://github.com/samson-media/barn/releases/tag/v0.1.3
|
||||
[0.1.2]: https://github.com/samson-media/barn/releases/tag/v0.1.2
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>com.samsonmedia</groupId>
|
||||
<artifactId>barn</artifactId>
|
||||
<version>0.1.4</version>
|
||||
<version>0.1.7</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>Barn</name>
|
||||
@@ -121,6 +121,22 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>true</filtering>
|
||||
<includes>
|
||||
<include>version.properties</include>
|
||||
</includes>
|
||||
</resource>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
<filtering>false</filtering>
|
||||
<excludes>
|
||||
<exclude>version.properties</exclude>
|
||||
</excludes>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<!-- Compiler -->
|
||||
<plugin>
|
||||
|
||||
@@ -13,7 +13,7 @@ import picocli.CommandLine.Spec;
|
||||
@Command(
|
||||
name = "barn",
|
||||
mixinStandardHelpOptions = true,
|
||||
version = "barn 0.1.2",
|
||||
versionProvider = VersionProvider.class,
|
||||
description = "Cross-platform job daemon for media processing",
|
||||
subcommands = {
|
||||
RunCommand.class,
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.samsonmedia.barn.cli;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
import picocli.CommandLine.IVersionProvider;
|
||||
|
||||
/**
|
||||
* Provides version information from the version.properties resource file.
|
||||
*
|
||||
* <p>The version is injected at build time via Maven resource filtering.
|
||||
*/
|
||||
public final class VersionProvider implements IVersionProvider {
|
||||
|
||||
@Override
|
||||
public String[] getVersion() {
|
||||
String version = "unknown";
|
||||
try (InputStream is = getClass().getResourceAsStream("/version.properties")) {
|
||||
if (is != null) {
|
||||
Properties props = new Properties();
|
||||
props.load(is);
|
||||
version = props.getProperty("version", "unknown");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// Fall back to unknown
|
||||
}
|
||||
return new String[]{"barn " + version};
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,41 @@
|
||||
[
|
||||
{
|
||||
"name": "com.samsonmedia.barn.cli.VersionProvider",
|
||||
"allDeclaredConstructors": true,
|
||||
"allPublicConstructors": true
|
||||
},
|
||||
{
|
||||
"name": "com.samsonmedia.barn.ipc.IpcMessage",
|
||||
"allDeclaredConstructors": true,
|
||||
"allPublicConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allPublicMethods": true,
|
||||
"allDeclaredFields": true
|
||||
},
|
||||
{
|
||||
"name": "com.samsonmedia.barn.jobs.Job",
|
||||
"allDeclaredConstructors": true,
|
||||
"allPublicConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allPublicMethods": true,
|
||||
"allDeclaredFields": true
|
||||
},
|
||||
{
|
||||
"name": "com.samsonmedia.barn.jobs.JobManifest",
|
||||
"allDeclaredConstructors": true,
|
||||
"allPublicConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allPublicMethods": true,
|
||||
"allDeclaredFields": true
|
||||
},
|
||||
{
|
||||
"name": "com.samsonmedia.barn.state.JobState",
|
||||
"allDeclaredConstructors": true,
|
||||
"allPublicConstructors": true,
|
||||
"allDeclaredMethods": true,
|
||||
"allPublicMethods": true,
|
||||
"allDeclaredFields": true
|
||||
},
|
||||
{
|
||||
"name": "ch.qos.logback.core.status.NopStatusListener",
|
||||
"allDeclaredConstructors": true,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"resources": {
|
||||
"includes": [
|
||||
{"pattern": "logback.xml"},
|
||||
{"pattern": "version.properties"},
|
||||
{"pattern": "META-INF/.*"}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
version=${project.version}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.samsonmedia.barn.cli;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class VersionProviderTest {
|
||||
|
||||
@Test
|
||||
void getVersion_shouldReturnVersionFromProperties() {
|
||||
// Arrange
|
||||
var provider = new VersionProvider();
|
||||
|
||||
// Act
|
||||
String[] version = provider.getVersion();
|
||||
|
||||
// Assert
|
||||
assertThat(version).hasSize(1);
|
||||
assertThat(version[0]).startsWith("barn ");
|
||||
assertThat(version[0]).doesNotContain("unknown");
|
||||
assertThat(version[0]).doesNotContain("${");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user