diff --git a/.github/workflows/fedora-copr-build.yml b/.github/workflows/fedora-copr-build.yml index 044113f28..3978181b6 100644 --- a/.github/workflows/fedora-copr-build.yml +++ b/.github/workflows/fedora-copr-build.yml @@ -5,6 +5,7 @@ on: - scripts/docker/** branches: - master + - current jobs: setup-build: @@ -52,5 +53,5 @@ jobs: - name: run the copr build script run: | cd .. - bash -x subsurface/packaging/copr/make-package.sh post + bash -x subsurface/packaging/copr/make-package.sh ${{ github.refname }} diff --git a/.github/workflows/ubuntu-launchpad-build.yml b/.github/workflows/ubuntu-launchpad-build.yml index ba1f9cfdc..41941d259 100644 --- a/.github/workflows/ubuntu-launchpad-build.yml +++ b/.github/workflows/ubuntu-launchpad-build.yml @@ -5,6 +5,7 @@ on: - scripts/docker/** branches: - master + - current jobs: push-to-ppa: @@ -47,5 +48,5 @@ jobs: - name: run the launchpad make-package script run: | cd .. - bash -x subsurface/packaging/ubuntu/make-package.sh post + bash -x subsurface/packaging/ubuntu/make-package.sh ${{ github.ref_name }} diff --git a/packaging/copr/make-package.sh b/packaging/copr/make-package.sh index e1a088b7f..052377284 100644 --- a/packaging/copr/make-package.sh +++ b/packaging/copr/make-package.sh @@ -70,22 +70,18 @@ fi # file, this is hard coded to 1 - it's entirely possible that there will be use cases where we # need to push additional versions... but it seems impossible to predict what exactly would drive # those and how to automate them -if [[ "$1" = "post" ]] ; then - # daily vs. release - if [[ "$GITREVISION" == "" ]] ; then - # this is a release - echo "RELEASE PROCESS IS NOT WELL TESTED" - REPO="Subsurface" - SUMMARY="official Fedora RPMs from the Subsurface project" - DESCRIPTION="This is the official Subsurface build, provided by the Subsurface team, including our own custom libdivecomputer." - else - REPO="Subsurface-test" - SUMMARY="rolling build of the latest development version of Subsurface" - DESCRIPTION="This is a 'daily' build of Subsurface, provided by the Subsurface team, based on the latest sources. The builds aren't always well tested." - fi - cd "$HOME"/rpmbuild - # shellcheck disable=SC2002 - cat "$TOPDIR"/subsurface/packaging/copr/subsurface.spec | sed "s/%define latestVersion.*/%define latestVersion $GITVERSION/;s/DESCRIPTION/$DESCRIPTION/;s/SUMMARY/$SUMMARY/" > SPECS/subsurface.spec - rpmbuild --verbose -bs "$(pwd)/SPECS/subsurface.spec" - copr build --nowait $REPO "$(pwd)/SRPMS/subsurface-$GITVERSION"-1.fc*.src.rpm +if [[ "$1" = "current" ]] ; then + # this is a release + REPO="Subsurface" + SUMMARY="official Fedora RPMs from the Subsurface project" + DESCRIPTION="This is the current (or roughly 'weekly') Subsurface release build, provided by the Subsurface team, including our own custom libdivecomputer." +else + REPO="Subsurface-test" + SUMMARY="rolling build of the latest development version of Subsurface" + DESCRIPTION="This is a 'daily' build of Subsurface, provided by the Subsurface team, based on the latest sources. The builds aren't always well tested." fi +cd "$HOME"/rpmbuild +# shellcheck disable=SC2002 +cat "$TOPDIR"/subsurface/packaging/copr/subsurface.spec | sed "s/%define latestVersion.*/%define latestVersion $GITVERSION/;s/DESCRIPTION/$DESCRIPTION/;s/SUMMARY/$SUMMARY/" > SPECS/subsurface.spec +rpmbuild --verbose -bs "$(pwd)/SPECS/subsurface.spec" +copr build --nowait $REPO "$(pwd)/SRPMS/subsurface-$GITVERSION"-1.fc*.src.rpm diff --git a/packaging/ubuntu/make-package.sh b/packaging/ubuntu/make-package.sh index cb168c57d..91e664833 100644 --- a/packaging/ubuntu/make-package.sh +++ b/packaging/ubuntu/make-package.sh @@ -118,12 +118,9 @@ fi cd .. -if [[ "$1" = "post" ]] ; then - # daily vs. release - if [[ "$GITREVISION" == "" ]] ; then - # this is a release - dput ppa:subsurface/subsurface "$FOLDER-$rev"~*.changes - else - dput ppa:subsurface/subsurface-daily "$FOLDER-$rev"~*.changes - fi +if [[ "$1" = "current" ]] ; then + # this is a current release + dput ppa:subsurface/subsurface "$FOLDER-$rev"~*.changes +else + dput ppa:subsurface/subsurface-daily "$FOLDER-$rev"~*.changes fi