Skip to content

Commit

Permalink
Move version check a bit further down so we can get the version varia…
Browse files Browse the repository at this point in the history
…ble exported
  • Loading branch information
OoLunar committed Jul 9, 2024
1 parent 3e6311b commit 85a453c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions .github/scripts/package-opus.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#!/bin/bash

# Check if the output file exists and if we've already built it for this version
EXPORT_DIR="$WORKSPACE/libs/libopus/$RID/native"
if [ -f "$EXPORT_DIR/$FILE" ]; then
COMMIT_MESSAGE="$(git log -1 --pretty=%B -- "$EXPORT_DIR/$FILE")"
if [[ "$COMMIT_MESSAGE" == *"$OPUS_VERSION"* ]]; then
echo "Already built $FILE for $OPUS_VERSION"
exit 0
fi
fi

# Create Opus dir
mkdir -p "$WORKSPACE/libs/opus"
cd "$WORKSPACE/libs/opus"
Expand All @@ -22,6 +12,16 @@ git fetch --tags
OPUS_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))"
echo "version=$(echo $OPUS_VERSION | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')" >> $GITHUB_OUTPUT

# Check if the output file exists and if we've already built it for this version
EXPORT_DIR="$WORKSPACE/libs/libopus/$RID/native"
if [ -f "$EXPORT_DIR/$FILE" ]; then
COMMIT_MESSAGE="$(git log -1 --pretty=%B -- "$EXPORT_DIR/$FILE")"
if [[ "$COMMIT_MESSAGE" == *"$OPUS_VERSION"* ]]; then
echo "Already built $FILE for $OPUS_VERSION"
exit 0
fi
fi

# Checkout the latest tag
git checkout "$OPUS_VERSION"

Expand Down
20 changes: 10 additions & 10 deletions .github/scripts/package-sodium.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
#!/bin/bash

# Check if the output file exists and if we've already built it for this version
EXPORT_DIR="$WORKSPACE/libs/libsodium/$RID/native"
if [ -f "$EXPORT_DIR/$FILE" ]; then
COMMIT_MESSAGE="$(git log -1 --pretty=%B -- "$EXPORT_DIR/$FILE")"
if [[ "$COMMIT_MESSAGE" == *"$SODIUM_VERSION"* ]]; then
echo "Already built $FILE for $SODIUM_VERSION"
exit 0
fi
fi

# Create Sodium dir
mkdir -p "$WORKSPACE/libs/sodium"
cd "$WORKSPACE/libs/sodium"
Expand All @@ -22,6 +12,16 @@ git fetch --tags
SODIUM_VERSION="$(git describe --tags $(git rev-list --tags --max-count=1))"
echo "version=$(echo $SODIUM_VERSION | perl -pe '($_)=/([0-9]+([.][0-9]+)+)/')" >> $GITHUB_OUTPUT

# Check if the output file exists and if we've already built it for this version
EXPORT_DIR="$WORKSPACE/libs/libsodium/$RID/native"
if [ -f "$EXPORT_DIR/$FILE" ]; then
COMMIT_MESSAGE="$(git log -1 --pretty=%B -- "$EXPORT_DIR/$FILE")"
if [[ "$COMMIT_MESSAGE" == *"$SODIUM_VERSION"* ]]; then
echo "Already built $FILE for $SODIUM_VERSION"
exit 0
fi
fi

# Checkout the latest tag
git checkout "$SODIUM_VERSION"

Expand Down

0 comments on commit 85a453c

Please sign in to comment.