Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,21 +150,31 @@ jobs:
- Individual tool packages:
- cycod-win-x64-${{ env.VERSION }}.zip
- cycod-linux-x64-${{ env.VERSION }}.zip
- cycod-linux-arm64-${{ env.VERSION }}.zip
- cycod-osx-x64-${{ env.VERSION }}.zip
- cycod-osx-arm64-${{ env.VERSION }}.zip
- cycodt-win-x64-${{ env.VERSION }}.zip
- cycodt-linux-x64-${{ env.VERSION }}.zip
- cycodt-linux-arm64-${{ env.VERSION }}.zip
- cycodt-osx-x64-${{ env.VERSION }}.zip
- cycodt-osx-arm64-${{ env.VERSION }}.zip
- cycodmd-win-x64-${{ env.VERSION }}.zip
- cycodmd-linux-x64-${{ env.VERSION }}.zip
- cycodmd-linux-arm64-${{ env.VERSION }}.zip
- cycodmd-osx-x64-${{ env.VERSION }}.zip
- cycodmd-osx-arm64-${{ env.VERSION }}.zip
- cycodgr-win-x64-${{ env.VERSION }}.zip
- cycodgr-linux-x64-${{ env.VERSION }}.zip
- cycodgr-linux-arm64-${{ env.VERSION }}.zip
- cycodgr-osx-x64-${{ env.VERSION }}.zip
- cycodgr-osx-arm64-${{ env.VERSION }}.zip

- Platform packages (all tools):
- cycodev-tools-win-x64-${{ env.VERSION }}.zip
- cycodev-tools-linux-x64-${{ env.VERSION }}.zip
- cycodev-tools-linux-arm64-${{ env.VERSION }}.zip
- cycodev-tools-osx-x64-${{ env.VERSION }}.zip
- cycodev-tools-osx-arm64-${{ env.VERSION }}.zip

- name: Publish to NuGet
if: ${{ env.NUGET_API_KEY != '' }}
Expand Down
19 changes: 13 additions & 6 deletions scripts/_functions.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cycod_version_calculate() {
fi

# Try to extract a YYYYMMDD date pattern from the version
DATE_PART=$(echo "$VERSION" | grep -oE '20[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])')
DATE_PART=$(echo "$VERSION" | grep -oE '20[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])' || true)
DAY_OF_YEAR=0

if [ -n "$DATE_PART" ]; then
Expand All @@ -64,7 +64,14 @@ cycod_version_calculate() {
DAY=${DATE_PART:6:2}

# Convert to day of year
DAY_OF_YEAR=$(date -d "$YEAR-$MONTH-$DAY" +%j | sed 's/^0*//')
# Use different date command syntax for macOS vs Linux
if date --version >/dev/null 2>&1; then
# GNU date (Linux)
DAY_OF_YEAR=$(date -d "$YEAR-$MONTH-$DAY" +%j | sed 's/^0*//')
else
# BSD date (macOS)
DAY_OF_YEAR=$(date -j -f "%Y-%m-%d" "$YEAR-$MONTH-$DAY" +%j | sed 's/^0*//')
fi
echo "Using date from version: $YEAR-$MONTH-$DAY (day of year: $DAY_OF_YEAR)"
else
echo "No date found in version, using today's date as fallback"
Expand Down Expand Up @@ -164,7 +171,7 @@ cycod_pack_dotnet() {
local TOOLS=("cycod" "cycodt" "cycodmd" "cycodgr")

# List of runtimes to publish for
local RIDS=("win-x64" "linux-x64" "osx-x64")
local RIDS=("win-x64" "linux-x64" "linux-arm64" "osx-x64" "osx-arm64")

echo "Packing projects with Version=$VERSION, NumericVersion=$NUMERIC_VERSION"

Expand Down Expand Up @@ -265,7 +272,7 @@ cycod_publish_self_contained() {
local TOOLS=("cycod" "cycodt" "cycodmd" "cycodgr")

# List of runtimes to publish for
local RIDS=("win-x64" "linux-x64" "osx-x64")
local RIDS=("win-x64" "linux-x64" "linux-arm64" "osx-x64" "osx-arm64")

# First, restore dependencies
dotnet restore
Expand Down Expand Up @@ -334,7 +341,7 @@ cycod_publish_self_contained() {

# Create individual ZIP for platform+tool
local TOOL_PLATFORM_ZIP="$TOOL-$RID-$VERSION.zip"
local TOOL_PLATFORM_ZIP_PATH=$(realpath "$OUTPUT_DIR/$TOOL_PLATFORM_ZIP")
local TOOL_PLATFORM_ZIP_PATH="$(cd "$OUTPUT_DIR" && pwd)/$TOOL_PLATFORM_ZIP"
echo " Creating ZIP for $TOOL-$RID: $TOOL_PLATFORM_ZIP"

# Navigate to the directory and zip its contents
Expand All @@ -345,7 +352,7 @@ cycod_publish_self_contained() {

# Create platform-specific aggregate ZIP file with all tools
local PLATFORM_ZIP="cycodev-tools-$RID-$VERSION.zip"
local PLATFORM_ZIP_PATH=$(realpath "$OUTPUT_DIR/$PLATFORM_ZIP")
local PLATFORM_ZIP_PATH="$(cd "$OUTPUT_DIR" && pwd)/$PLATFORM_ZIP"
echo "Creating platform aggregate ZIP: $PLATFORM_ZIP"

# Navigate to the directory and zip its contents
Expand Down
2 changes: 1 addition & 1 deletion src/cycod/cycod.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<OutputType>Exe</OutputType>

<!-- Cross-platform support -->
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>

<!-- NuGet Package Properties -->
<PackageId>CycoD</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/cycodgr/cycodgr.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<OutputType>Exe</OutputType>

<!-- Cross-platform support -->
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>

<!-- NuGet Package Properties -->
<PackageId>CycoGr</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/cycodmd/cycodmd.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<OutputType>Exe</OutputType>

<!-- Cross-platform support -->
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>

<!-- NuGet Package Properties -->
<PackageId>CycoDmd</PackageId>
Expand Down
2 changes: 1 addition & 1 deletion src/cycodt/cycodt.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<OutputType>Exe</OutputType>

<!-- Cross-platform support -->
<RuntimeIdentifiers>win-x64;linux-x64;osx-x64</RuntimeIdentifiers>
<RuntimeIdentifiers>win-x64;linux-x64;linux-arm64;osx-x64;osx-arm64</RuntimeIdentifiers>

<!-- NuGet Package Properties -->
<PackageId>CycoDt</PackageId>
Expand Down