specs/repositories.rbspec
author Jan Vrany <jan.vrany@labware.com>
Mon, 27 Jun 2022 15:27:52 +0100
changeset 326 42a9250a00b2
parent 314 834d89a1e75d
child 338 80fe74880a49
permissions -rw-r--r--
Rakefiles: propagate phase-changes back to staging repository When pusshing changes to upstream, a changesets' phase may change (from draft to public). These phase-changes need to be propagated back to 'staging' repository so it cannot ve changed anymore.

# This file defines a set of repositories to fetch source code from.
#

begin
  #
  # All packages that are not (yet) forked are taken from
  # eXept's public CVS repository
  #
  repository :'exept:public' do
    type :cvs
    origin    ":pserver:cvs@cvs.smalltalk-x.de:/cvs/stx"
  end

  #
  # Auto-configure jv-branch:public and jv-branch:private
  # repositories based on the URL of rakefiles.
  #
  origin = HG::Repository.new(BUILD_DIR / '..')
  branch = origin.branch()
  origin_forest_url = origin.paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2)
  cloned_from_integration = (origin_forest_url =~ /nereid/) && (branch == 'default')

  repository :'jv-branch:public' do
    type :hg
    separator '-'
    canonical "https://swing.fit.cvut.cz/hg"

    if (cloned_from_integration)
      upstream  "https://swing.fit.cvut.cz/hg"
    end

    origin origin_forest_url
  end

rescue Exception
  info "Building from source archive"
end