diff --git a/build/jam/CommandLineArguments b/build/jam/CommandLineArguments index 79c7f9e46a..0473cbec2f 100644 --- a/build/jam/CommandLineArguments +++ b/build/jam/CommandLineArguments @@ -76,6 +76,17 @@ rule ProcessCommandLineArguments Always $(JAM_TARGETS) ; } + # Copy the given set of local package files to the remote repository + # and create a new version of that remote repository (useful for + # testing the package repository before pushing). + case build-remote-test-repository : { + BuildRemoteHaikuPortsRepository $(JAM_TARGETS[1]) + : $(JAM_TARGETS[2-]) ; + JAM_TARGETS = $(JAM_TARGETS[1]) ; + NotFile $(JAM_TARGETS) ; + Always $(JAM_TARGETS) ; + } + # A target starting with "@" is a build profile. case @* : { HAIKU_BUILD_PROFILE = [ Match "@(.*)" : $(JAM_TARGETS[1]) ] ; diff --git a/build/jam/RepositoryRules b/build/jam/RepositoryRules index 673a1af6dd..5ff7ae4b2d 100644 --- a/build/jam/RepositoryRules +++ b/build/jam/RepositoryRules @@ -652,3 +652,26 @@ actions UploadPackages1 scp $(HAIKU_REMOTE_REPOSITORY_PACKAGES) $remote:hpkg-upload/ fi } + + +rule BuildRemoteHaikuPortsRepository target : packages +{ + UploadPackages $(target) : $(packages) ; + + local packageListFile = HaikuPorts-packages ; + BuildRemoteHaikuPortsRepository1 $(target) : $(packageListFile) ; +} + + +actions BuildRemoteHaikuPortsRepository1 +{ + remote=git.haiku-os.org + + repoArch=$(TARGET_PACKAGING_ARCH) + scp $(2) $remote:hpkg-upload/$repoArch + + cd $(HAIKU_TOP) + branch=`git branch | cut -c3-` + + ssh $remote "build_repository_for_testing.sh $branch $repoArch" +}