Skip to content

Commit

Permalink
Merge pull request gyunaev#424 from Abestanis/misc/correct_version_pa…
Browse files Browse the repository at this point in the history
…ttern

Enforce vX.X.X as the version pattern for the git tag
  • Loading branch information
gyunaev authored Oct 19, 2020
2 parents d4a6158 + 89d887a commit 5384eec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
id: check-deploy
shell: bash
run: |
if [[ '${{ github.event.ref }}' =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ && "$RUNNER_OS" == "Windows" ]]; then
if [[ '${{ github.event.ref }}' =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ && "$RUNNER_OS" == "Windows" ]]; then
echo ::set-output name=is_deploy::true
echo "Deployment build detected"
else
Expand Down Expand Up @@ -129,15 +129,15 @@ jobs:
release:
name: Create Release
needs: build
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') && contains(github.ref, '.')
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') && contains(github.ref, '.')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check if this is a deployment build
shell: bash
run: |
if [[ '${{ github.event.ref }}' =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
if [[ '${{ github.event.ref }}' =~ ^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Creating release ${{ github.ref }}..."
else
echo "Tag does not match: ${{ github.event.ref }}"
Expand Down
2 changes: 1 addition & 1 deletion contrib/rpm/birdtray.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Release: 1%{?dist}
Epoch: 0
License: GPLv3
Group: System Environment/Shells
Source0: https://github.com/gyunaev/%{name}/archive/%{version}.tar.gz
Source0: https://github.com/gyunaev/%{name}/archive/v%{version}.tar.gz
URL: https://github.com/gyunaev/birdtray
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: cmake3 gcc-c++ desktop-file-utils
Expand Down
2 changes: 1 addition & 1 deletion src/autoupdater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#define LATEST_VERSION_INFO_URL "https://api.github.com/repos/gyunaev/birdtray/releases/latest"
#define GENERIC_DOWNLOAD_URL "https://github.com/gyunaev/birdtray/releases/latest"
#define VERSION_TAG_REGEX R"(^(RELEASE_|v)?(?<major>\d+)\.(?<minor>\d+)(\.(?<patch>\d+))?$)"
#define VERSION_TAG_REGEX R"(^v(?<major>\d+)\.(?<minor>\d+)(\.(?<patch>\d+))?$)"

AutoUpdater::AutoUpdater(QObject* parent) :
QObject(parent),
Expand Down

0 comments on commit 5384eec

Please sign in to comment.