From 6fa21224a2862b7250107e2d9ccaa8dfead89a92 Mon Sep 17 00:00:00 2001 From: SerhiiGadzhilov <71632867+SerhiiGadzhilov@users.noreply.github.com> Date: Thu, 31 Dec 2020 17:27:15 +0300 Subject: [PATCH] SYNERGY-400 Unify artifacts names (#6896) * SYNERGY-400 Unify artifacts names * SYNEGY-400 Check stage during tag creation --- .github/actions/build-number/build-number.js | 16 +++++++++-- .github/workflows/job-sonarcloud.yml | 2 +- CI/Linux/linux-build.yml | 22 +++++++-------- CI/MacOS/mac-build.yml | 4 +-- CI/Windows/windows-build.yml | 5 ++-- ChangeLog | 4 +++ azure-pipelines.yml | 6 ++-- cmake/Version.cmake | 4 +-- dist/rpm/synergy-enterprise.spec.in | 29 ++++++++++++++++++++ dist/rpm/synergy.spec.in | 4 ++- 10 files changed, 70 insertions(+), 26 deletions(-) create mode 100644 dist/rpm/synergy-enterprise.spec.in diff --git a/.github/actions/build-number/build-number.js b/.github/actions/build-number/build-number.js index 00ef02f6d..268515140 100644 --- a/.github/actions/build-number/build-number.js +++ b/.github/actions/build-number/build-number.js @@ -17,6 +17,10 @@ function VersionPart(part) { return m_number; } + self.getSuffix = function(){ + return m_suffix; + } + self.toString = function() { return m_prefix + m_number.toString() + m_suffix; } @@ -93,6 +97,7 @@ function Version(version) { m_minor.setPart(versionParts[1]); m_build.setPart(versionParts[2]); m_patch.setNumber(m_build.getNumber()); + m_build.setNumber(0); } else if (versionParts.length == 4) { m_major.setPart(versionParts[0]); @@ -117,10 +122,15 @@ function Version(version) { return m_patch.getNumber(); } + this.getStage = function(){ + return m_build.getSuffix(); + } + this.isSamePatch = function(version) { - return (m_major.getNumber() == version.getMajor() && - m_minor.getNumber() == version.getMinor() && - m_patch.getNumber() == version.getPatch()); + return (this.getMajor() == version.getMajor() && + this.getMinor() == version.getMinor() && + this.getPatch() == version.getPatch() && + this.getStage() == version.getStage()); } init(); diff --git a/.github/workflows/job-sonarcloud.yml b/.github/workflows/job-sonarcloud.yml index dde3108b9..07fd8e185 100644 --- a/.github/workflows/job-sonarcloud.yml +++ b/.github/workflows/job-sonarcloud.yml @@ -3,7 +3,7 @@ name: SonarCloud Static Analysis on: push: branches: [ master ] - pull_request_target: + pull_request: branches: [ master ] jobs: diff --git a/CI/Linux/linux-build.yml b/CI/Linux/linux-build.yml index 9ff5b9469..d7b5ca661 100644 --- a/CI/Linux/linux-build.yml +++ b/CI/Linux/linux-build.yml @@ -58,8 +58,8 @@ steps: . ./build-release/version SYNERGY_VERSION="$SYNERGY_VERSION_MAJOR.$SYNERGY_VERSION_MINOR.$SYNERGY_VERSION_PATCH" SYNERGY_REVISION=`git rev-parse --short=8 HEAD` - SYNERGY_DEB_VERSION="${SYNERGY_VERSION}.${SYNERGY_VERSION_STAGE}~b$(Build.BuildNumber)+${SYNERGY_REVISION}" - SYNERGY_RPM_VERSION="${SYNERGY_VERSION}-$(Build.BuildNumber).${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}" + SYNERGY_DEB_VERSION="${SYNERGY_VERSION}.${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}" + SYNERGY_RPM_VERSION="${SYNERGY_VERSION}-${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}" echo "##vso[task.setvariable variable=SYNERGY_VERSION_BUILD]${SYNERGY_VERSION_BUILD}" echo "##vso[task.setvariable variable=SYNERGY_VERSION_STAGE]${SYNERGY_VERSION_STAGE}" echo "##vso[task.setvariable variable=SYNERGY_VERSION]${SYNERGY_VERSION}" @@ -75,7 +75,7 @@ steps: mkdir standard_package cd .. filename=$(ls synergy_*.deb) - filename_new="synergy_${SYNERGY_DEB_VERSION}_$(name)${filename##*${SYNERGY_REVISION}}" + filename_new="synergy_${SYNERGY_VERSION}-${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}_$(name)${filename##*${SYNERGY_REVISION}}" mv $filename $(Build.Repository.LocalPath)/standard_package/$filename_new cd $(Build.Repository.LocalPath)/standard_package md5sum $filename_new >> ${filename_new}.checksum.txt @@ -95,7 +95,7 @@ steps: mkdir enterprise_package cd .. filename=$(ls synergy_*.deb) - filename_new="synergy-enterprise_$(SYNERGY_DEB_VERSION)_$(name)${filename##*$(SYNERGY_REVISION)}" + filename_new="synergy-enterprise_${SYNERGY_VERSION}-${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}_$(name)${filename##*$(SYNERGY_REVISION)}" mv $filename $(Build.Repository.LocalPath)/enterprise_package/$filename_new cd $(Build.Repository.LocalPath)/enterprise_package md5sum $filename_new >> ${filename_new}.checksum.txt @@ -112,14 +112,14 @@ steps: make install/strip cd rpm rpmbuild -bb --define "_topdir $(pwd)" --buildroot $(pwd)/BUILDROOT synergy.spec - rpmlint --verbose RPMS/x86_64/*.rpm - cd RPMS/x86_64 + rpmlint --verbose RPMS/*.rpm + cd RPMS filename=$(ls *.rpm) md5sum $filename >> ${filename}.checksum.txt sha1sum $filename >> ${filename}.checksum.txt sha256sum $filename >> ${filename}.checksum.txt cd .. - mv x86_64 $(Build.Repository.LocalPath)/standard_package + mv RPMS $(Build.Repository.LocalPath)/standard_package displayName: "Package Binary RPM(standard)" condition: eq(variables['packager'],'rpm') env: @@ -129,15 +129,15 @@ steps: cd build-ent make install/strip cd rpm - rpmbuild -bb --define "_topdir $(pwd)" --buildroot $(pwd)/BUILDROOT synergy.spec - rpmlint --verbose RPMS/x86_64/*.rpm - cd RPMS/x86_64 + rpmbuild -bb --define "_topdir $(pwd)" --buildroot $(pwd)/BUILDROOT synergy-enterprise.spec + rpmlint --verbose RPMS/*.rpm + cd RPMS filename=$(ls *.rpm) md5sum $filename >> ${filename}.checksum.txt sha1sum $filename >> ${filename}.checksum.txt sha256sum $filename >> ${filename}.checksum.txt cd .. - mv x86_64 $(Build.Repository.LocalPath)/enterprise_package + mv RPMS $(Build.Repository.LocalPath)/enterprise_package ls -la displayName: "Package Binary RPM(enterprise)" condition: eq(variables['packager'],'rpm') diff --git a/CI/MacOS/mac-build.yml b/CI/MacOS/mac-build.yml index 8bf72c637..1bc98e359 100644 --- a/CI/MacOS/mac-build.yml +++ b/CI/MacOS/mac-build.yml @@ -75,8 +75,8 @@ steps: . ./build/version SYNERGY_VERSION="$SYNERGY_VERSION_MAJOR.$SYNERGY_VERSION_MINOR.$SYNERGY_VERSION_PATCH" SYNERGY_REVISION=`git rev-parse --short=8 HEAD` - SYNERGY_DMG_VERSION="${SYNERGY_VERSION}-${SYNERGY_VERSION_STAGE}_b$(Build.BuildNumber)-${SYNERGY_REVISION}" - SYNERGY_DMG_FILENAME=$(prefix)_v${SYNERGY_DMG_VERSION}_macos_$(platform).dmg + SYNERGY_DMG_VERSION="${SYNERGY_VERSION}-${SYNERGY_VERSION_STAGE}.${SYNERGY_REVISION}" + SYNERGY_DMG_FILENAME=$(prefix)_${SYNERGY_DMG_VERSION}_macos_$(platform).dmg echo "##vso[task.setvariable variable=SYNERGY_VERSION_STAGE]${SYNERGY_VERSION_STAGE}" echo "##vso[task.setvariable variable=SYNERGY_VERSION_BUILD]${SYNERGY_VERSION_BUILD}" echo "##vso[task.setvariable variable=SYNERGY_VERSION]${SYNERGY_VERSION}" diff --git a/CI/Windows/windows-build.yml b/CI/Windows/windows-build.yml index 160eba06d..4ef18a7ef 100644 --- a/CI/Windows/windows-build.yml +++ b/CI/Windows/windows-build.yml @@ -177,17 +177,16 @@ steps: echo ##vso[task.setvariable variable=SYNERGY_VERSION]%SYNERGY_VERSION% echo ##vso[task.setvariable variable=SYNERGY_REVISION]%SYNERGY_REVISION% displayName: "Set Variables" - condition: eq(variables['Build.SourceBranch'], 'refs/heads/master') - script: | cd $(Build.Repository.LocalPath)\build32\installer\bin\Release\ - set FILENAME=$(prefix)_v$(SYNERGY_VERSION)-$(SYNERGY_VERSION_STAGE)_$(Build.BuildNumber).$(SYNERGY_REVISION)_windows_x86.msi + set FILENAME=$(prefix)_$(SYNERGY_VERSION)-$(SYNERGY_VERSION_STAGE).$(SYNERGY_REVISION)_windows_x86.msi ren "Synergy.msi" "%FILENAME%" $(Build.Repository.LocalPath)\ext\openssl\windows\x64\bin\openssl.exe md5 %FILENAME% > %FILENAME%.checksum.txt $(Build.Repository.LocalPath)\ext\openssl\windows\x64\bin\openssl.exe sha1 %FILENAME% >> %FILENAME%.checksum.txt $(Build.Repository.LocalPath)\ext\openssl\windows\x64\bin\openssl.exe sha256 %FILENAME% >> %FILENAME%.checksum.txt cd $(Build.Repository.LocalPath)\build64\installer\bin\Release\ - set FILENAME=$(prefix)_v$(SYNERGY_VERSION)-$(SYNERGY_VERSION_STAGE)_$(Build.BuildNumber).$(SYNERGY_REVISION)_windows_x64.msi + set FILENAME=$(prefix)_$(SYNERGY_VERSION)-$(SYNERGY_VERSION_STAGE).$(SYNERGY_REVISION)_windows_x64.msi ren "Synergy.msi" "%FILENAME%" $(Build.Repository.LocalPath)\ext\openssl\windows\x64\bin\openssl.exe md5 %FILENAME% > %FILENAME%.checksum.txt $(Build.Repository.LocalPath)\ext\openssl\windows\x64\bin\openssl.exe sha1 %FILENAME% >> %FILENAME%.checksum.txt diff --git a/ChangeLog b/ChangeLog index 902324f7d..728f81ee4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +v1.13.1-snapshot +=========== +=========== + v1.13.0-stable =========== Bug fixes: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6a7ee1c50..0e03ff8e5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -67,13 +67,13 @@ jobs: catalina-std: image: macOS-10.15 platform: x86-64 - version: 10.15 + version: 10.14 buildType: "standard" prefix: "synergy" catalina-ent: image: macOS-10.15 platform: x86-64 - version: 10.15 + version: 10.14 buildType: "enterprise" prefix: "synergy-enterprise" pool: @@ -98,7 +98,7 @@ jobs: vs2019ent: image: windows-2019 buildType: "enterprise" - prefix: "synergy_enterprise" + prefix: "synergy-enterprise" pool: vmImage: $[ variables['image'] ] diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 114d07546..244eff9d7 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -6,9 +6,9 @@ cmake_minimum_required (VERSION 3.4) set (SYNERGY_VERSION_MAJOR 1) set (SYNERGY_VERSION_MINOR 13) -set (SYNERGY_VERSION_PATCH 0) +set (SYNERGY_VERSION_PATCH 1) set (SYNERGY_VERSION_BUILD 1) -set (SYNERGY_VERSION_STAGE "stable") +set (SYNERGY_VERSION_STAGE "snapshot") # # Version from CI diff --git a/dist/rpm/synergy-enterprise.spec.in b/dist/rpm/synergy-enterprise.spec.in new file mode 100644 index 000000000..8e5928d66 --- /dev/null +++ b/dist/rpm/synergy-enterprise.spec.in @@ -0,0 +1,29 @@ +%define _rpmfilename %%{NAME}_%%{Version}-%%{Release}.rpm + +Name: synergy-enterprise +Version: @SYNERGY_VERSION@ +Summary: Keyboard and mouse sharing solution +Group: Applications/Productivity +URL: https://symless.com/synergy +Source: https://symless.com/synergy/downloads +Vendor: Symless +Packager: Symless +License: GPLv2 +Release: @SYNERGY_SNAPSHOT_INFO@%{?dist} + +%description +Synergy allows you to share one mouse and keyboard between multiple computers. +Work seamlessly across Windows, macOS and Linux. + +%files +%defattr(755,root,root,-) +%{_bindir}/synergy +%{_bindir}/synergyc +%{_bindir}/synergys +%{_bindir}/syntool +%attr(644,-,-) %{_datarootdir}/applications/synergy.desktop +%attr(644,-,-) %{_datarootdir}/icons/hicolor/scalable/apps/synergy.svg + +%changelog +* Wed Apr 26 2017 Symless +- Initial version of the package diff --git a/dist/rpm/synergy.spec.in b/dist/rpm/synergy.spec.in index 2ab17d766..4b484af43 100644 --- a/dist/rpm/synergy.spec.in +++ b/dist/rpm/synergy.spec.in @@ -1,3 +1,5 @@ +%define _rpmfilename %%{NAME}_%%{VERSION}-%%{RELEASE}.rpm + Name: synergy Version: @SYNERGY_VERSION@ Summary: Keyboard and mouse sharing solution @@ -7,7 +9,7 @@ Source: https://symless.com/synergy/downloads Vendor: Symless Packager: Symless License: GPLv2 -Release: @SYNERGY_VERSION_BUILD@@SYNERGY_SNAPSHOT_INFO@%{?dist} +Release: @SYNERGY_SNAPSHOT_INFO@%{?dist} %description Synergy allows you to share one mouse and keyboard between multiple computers.