specs/repositories.rbspec
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 16 May 2018 05:30:33 +0000
branchstx-8.0.0
changeset 234 05943c900d5e
parent 171 2662903f1dfd
child 237 69ab924b97bf
permissions -rwxr-xr-x
Rakefiles: added new target `artifacts:source` ...to generate source code archive (`.tar.bz2`). This can be later unpacked and compiled by rake compile Introduced mainly to be able to provide a source code snapshot to CG.

# 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
    canonical ":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_forest_url = HG::Repository.new(BUILD_DIR / '..').paths['default'].slice(0.. - 'stx-goodies-builder-rake'.size - 2)
  cloned_from_bitbucket = origin_forest_url =~ /bitbucket.org/
  cloned_from_swing     = origin_forest_url =~ /swing\.fit\.cvut\.cz/
  cloned_fron_devsrepo  = (not cloned_from_bitbucket) and (not cloned_from_swing)


  repository :'jv-branch:public' do
    type :hg
    separator '-'
    canonical "https://bitbucket.org/janvrany"

    case
    when cloned_from_swing
      staging   "ssh://hg@swing.fit.cvut.cz//var/local/hg"
    when cloned_fron_devsrepo
      upstream  "ssh://hg@swing.fit.cvut.cz//var/local/hg"
      staging   origin_forest_url
    end
  end

  # Only core developer and/or Jenkins have access to
  # stx:stc and stx:librun...
  if (core_developer? or jenkins?)
    repository :'jv-branch:private' do
      type :hg
      separator '-'
      case
      when cloned_fron_devsrepo
        canonical origin_forest_url
      else
        canonical "ssh://192.168.12.2//hg"
      end
    end
  end
rescue Exception
  info "Building from source archive"
end