Skip to content

Commit 8b39dd3

Browse files
committed
quick: Trying different method for cirrus
Checking release before tag now. Signed-off-by: Tyler Erickson <[email protected]>
1 parent 958af5d commit 8b39dd3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

.cirrus.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ task:
1010
submodules_script: git submodule update --init --recursive --progress
1111
release_script: |
1212
branchName=$(printf '%s' "$CIRRUS_BRANCH" | tr '/' '-')
13-
if [ "$CIRRUS_TAG" != "" ]; then
14-
branchName=$(printf '%s' "$CIRRUS_TAG" | tr '/' '-')
15-
elif [ "$CIRRUS_RELEASE" != "" ]; then
13+
if [ "$CIRRUS_RELEASE" != "" ]; then
1614
branchName=$(printf '%s' "$CIRRUS_RELEASE" | tr '/' '-')
15+
elif [ "$CIRRUS_TAG" != "" ]; then
16+
branchName=$(printf '%s' "$CIRRUS_TAG" | tr '/' '-')
1717
fi
1818
meson setup build -Dprefix=$CIRRUS_WORKING_DIR/output -Dmandir=$CIRRUS_WORKING_DIR/output/man -Dbindir=$CIRRUS_WORKING_DIR/output --buildtype=release
1919
meson install -C build

cirrus_ci_post_freebsd_release.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ if [ "$GITHUB_TOKEN" = "" ]; then
1616
fi
1717

1818
branchName=$(printf '%s' "$CIRRUS_BRANCH" | tr '/' '-')
19-
if [ "$CIRRUS_TAG" != "" ]; then
20-
branchName=$(printf '%s' "$CIRRUS_TAG" | tr '/' '-')
21-
elif [ "$CIRRUS_RELEASE" != "" ]; then
19+
if [ "$CIRRUS_RELEASE" != "" ]; then
2220
branchName=$(printf '%s' "$CIRRUS_RELEASE" | tr '/' '-')
21+
elif [ "$CIRRUS_TAG" != "" ]; then
22+
branchName=$(printf '%s' "$CIRRUS_TAG" | tr '/' '-')
2323
fi
2424
file_content_type="application/octet-stream"
2525
file_to_upload="$CIRRUS_WORKING_DIR/openSeaChest-$branchName-$(uname -s)-$(uname -r)-$(uname -m).tar.xz"
@@ -28,10 +28,10 @@ if [ -f "$file_to_upload" ]; then
2828

2929
echo "Uploading $file_to_upload..."
3030
name=$(basename "$file_to_upload")
31-
if [ "$CIRRUS_TAG" != "" ]; then
32-
url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/tag/$CIRRUS_TAG/assets?name=$name"
31+
if [ "$CIRRUS_RELEASE" != "" ]; then
32+
url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/$CIRRUS_RELEASE/assets?name=$name"
3333
else
34-
url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/tag/$CIRRUS_RELEASE/assets?name=$name"
34+
url_to_upload="https://uploads.github.com/repos/$CIRRUS_REPO_FULL_NAME/releases/tag/$CIRRUS_TAG/assets?name=$name"
3535
fi
3636
curl -X POST \
3737
--data-binary @"$file_to_upload" \

0 commit comments

Comments
 (0)