Refactoring to batch (#181)
The rationale of this pull request is to * have more maintainable and granular code * not maintain the custom made job engine * allow the users to customize the defaults of the releaser more easy * allow the users to create their own steps without the need to change any existing code * allow the users to fully change the flows and tasks logic * abstract underlying batch mechanism (Spring Batch) so it doesn't leak to production code * allow parallelization of the release process and release tasks
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser;
|
||||
|
||||
import releaser.internal.options.Parser;
|
||||
import releaser.internal.spring.ExecutionResultHandler;
|
||||
import releaser.internal.spring.SpringReleaser;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ReleaserApplication extends ReleaserCommandLineRunner {
|
||||
|
||||
public ReleaserApplication(SpringReleaser releaser,
|
||||
ExecutionResultHandler executionResultHandler, Parser parser) {
|
||||
super(releaser, executionResultHandler, parser);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication application = new SpringApplication(ReleaserApplication.class);
|
||||
application.setWebApplicationType(WebApplicationType.NONE);
|
||||
application.run(args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.buildsystem;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
final class SpringCloudBomConstants {
|
||||
|
||||
// boot
|
||||
static final String SPRING_BOOT = "spring-boot";
|
||||
static final String BOOT_STARTER_ARTIFACT_ID = "spring-boot-starter";
|
||||
static final String BOOT_STARTER_PARENT_ARTIFACT_ID = BOOT_STARTER_ARTIFACT_ID
|
||||
+ "-parent";
|
||||
static final String BOOT_DEPENDENCIES_ARTIFACT_ID = "spring-boot-dependencies";
|
||||
|
||||
// sc-build
|
||||
static final String CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID = "spring-cloud-dependencies-parent";
|
||||
static final String BUILD_ARTIFACT_ID = "spring-cloud-build";
|
||||
|
||||
// sc-release
|
||||
static final String CLOUD_DEPENDENCIES_ARTIFACT_ID = "spring-cloud-dependencies";
|
||||
static final String CLOUD_ARTIFACT_ID = "spring-cloud";
|
||||
static final String CLOUD_RELEASE_ARTIFACT_ID = "spring-cloud-release";
|
||||
static final String CLOUD_STARTER_ARTIFACT_ID = "spring-cloud-starter";
|
||||
static final String CLOUD_STARTER_PARENT_ARTIFACT_ID = "spring-cloud-starter-parent";
|
||||
|
||||
private SpringCloudBomConstants() {
|
||||
throw new IllegalStateException("Don't instantiate a utility class");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.buildsystem;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
class SpringCloudBuildsystemConfiguration {
|
||||
|
||||
@Bean
|
||||
SpringCloudMavenBomParser springCloudMavenBomParser() {
|
||||
return new SpringCloudMavenBomParser();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.buildsystem;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.maven.model.Model;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.buildsystem.CustomBomParser;
|
||||
import releaser.internal.buildsystem.VersionsFromBom;
|
||||
import releaser.internal.buildsystem.VersionsFromBomBuilder;
|
||||
import releaser.internal.project.Project;
|
||||
import releaser.internal.tech.PomReader;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.BOOT_DEPENDENCIES_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.BOOT_STARTER_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.BOOT_STARTER_PARENT_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.BUILD_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.CLOUD_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.CLOUD_DEPENDENCIES_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.CLOUD_RELEASE_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.CLOUD_STARTER_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.CLOUD_STARTER_PARENT_ARTIFACT_ID;
|
||||
import static releaser.cloud.buildsystem.SpringCloudBomConstants.SPRING_BOOT;
|
||||
|
||||
class SpringCloudMavenBomParser implements CustomBomParser {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(SpringCloudMavenBomParser.class);
|
||||
|
||||
@Override
|
||||
public VersionsFromBom parseBom(File root, ReleaserProperties properties) {
|
||||
VersionsFromBom springCloudBuild = springCloudBuild(root, properties);
|
||||
VersionsFromBom boot = bootVersion(root, properties);
|
||||
log.debug("Added Spring Cloud Build [{}] and boot versions [{}]",
|
||||
springCloudBuild, boot);
|
||||
return new VersionsFromBomBuilder().thisProjectRoot(root)
|
||||
.releaserProperties(properties).projects(springCloudBuild, boot).merged();
|
||||
}
|
||||
|
||||
private VersionsFromBom springCloudBuild(File root, ReleaserProperties properties) {
|
||||
String buildVersion = buildVersion(root, properties);
|
||||
if (StringUtils.isEmpty(buildVersion)) {
|
||||
return VersionsFromBom.EMPTY_VERSION;
|
||||
}
|
||||
VersionsFromBom scBuild = new VersionsFromBomBuilder().thisProjectRoot(root)
|
||||
.releaserProperties(properties).merged();
|
||||
scBuild.add(BUILD_ARTIFACT_ID, buildVersion);
|
||||
scBuild.add(CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, buildVersion);
|
||||
return scBuild;
|
||||
}
|
||||
|
||||
private String buildVersion(File root, ReleaserProperties properties) {
|
||||
String buildVersion = properties.getFixedVersions().get(BUILD_ARTIFACT_ID);
|
||||
if (StringUtils.hasText(buildVersion)) {
|
||||
return buildVersion;
|
||||
}
|
||||
File pom = new File(root, properties.getPom().getThisTrainBom());
|
||||
if (!pom.exists()) {
|
||||
return "";
|
||||
}
|
||||
Model model = PomReader.pom(root, properties.getPom().getThisTrainBom());
|
||||
String buildArtifact = model.getParent().getArtifactId();
|
||||
log.debug("[{}] artifact id is equal to [{}]",
|
||||
CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, buildArtifact);
|
||||
if (!CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID.equals(buildArtifact)) {
|
||||
throw new IllegalStateException(
|
||||
"The pom doesn't have a [spring-cloud-dependencies-parent] artifact id");
|
||||
}
|
||||
buildVersion = model.getParent().getVersion();
|
||||
log.debug("Spring Cloud Build version is equal to [{}]", buildVersion);
|
||||
return buildVersion;
|
||||
}
|
||||
|
||||
private String boot(File root, ReleaserProperties properties) {
|
||||
String bootVersion = properties.getFixedVersions().get(SPRING_BOOT);
|
||||
if (StringUtils.hasText(bootVersion)) {
|
||||
return bootVersion;
|
||||
}
|
||||
String pomWithBootStarterParent = properties.getPom()
|
||||
.getPomWithBootStarterParent();
|
||||
File pom = new File(root, pomWithBootStarterParent);
|
||||
if (!pom.exists()) {
|
||||
return "";
|
||||
}
|
||||
Model model = PomReader.pom(root, pomWithBootStarterParent);
|
||||
if (model == null) {
|
||||
return "";
|
||||
}
|
||||
String bootArtifactId = model.getParent().getArtifactId();
|
||||
log.debug("Boot artifact id is equal to [{}]", bootArtifactId);
|
||||
if (!BOOT_STARTER_PARENT_ARTIFACT_ID.equals(bootArtifactId)) {
|
||||
if (log.isDebugEnabled()) {
|
||||
throw new IllegalStateException("The pom doesn't have a ["
|
||||
+ BOOT_STARTER_PARENT_ARTIFACT_ID + "] artifact id");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
return model.getParent().getVersion();
|
||||
}
|
||||
|
||||
VersionsFromBom bootVersion(File root, ReleaserProperties properties) {
|
||||
String bootVersion = boot(root, properties);
|
||||
if (StringUtils.isEmpty(bootVersion)) {
|
||||
return VersionsFromBom.EMPTY_VERSION;
|
||||
}
|
||||
log.debug("Boot version is equal to [{}]", bootVersion);
|
||||
VersionsFromBom versionsFromBom = new VersionsFromBomBuilder()
|
||||
.thisProjectRoot(root).releaserProperties(properties).merged();
|
||||
versionsFromBom.add(SPRING_BOOT, bootVersion);
|
||||
versionsFromBom.add(BOOT_STARTER_PARENT_ARTIFACT_ID, bootVersion);
|
||||
versionsFromBom.add(BOOT_DEPENDENCIES_ARTIFACT_ID, bootVersion);
|
||||
return versionsFromBom;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<Project> setVersion(Set<Project> projects, String projectName,
|
||||
String version) {
|
||||
Set<Project> newProjects = new LinkedHashSet<>(projects);
|
||||
switch (projectName) {
|
||||
case SPRING_BOOT:
|
||||
case BOOT_STARTER_ARTIFACT_ID:
|
||||
case BOOT_STARTER_PARENT_ARTIFACT_ID:
|
||||
case BOOT_DEPENDENCIES_ARTIFACT_ID:
|
||||
updateBootVersions(newProjects, version);
|
||||
break;
|
||||
case BUILD_ARTIFACT_ID:
|
||||
case CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID:
|
||||
updateBuildVersions(newProjects, version);
|
||||
break;
|
||||
case CLOUD_ARTIFACT_ID:
|
||||
case CLOUD_DEPENDENCIES_ARTIFACT_ID:
|
||||
case CLOUD_RELEASE_ARTIFACT_ID:
|
||||
case CLOUD_STARTER_ARTIFACT_ID:
|
||||
case CLOUD_STARTER_PARENT_ARTIFACT_ID:
|
||||
updateSpringCloudVersions(newProjects, version);
|
||||
break;
|
||||
}
|
||||
return newProjects;
|
||||
}
|
||||
|
||||
private void updateBootVersions(Set<Project> newProjects, String version) {
|
||||
remove(newProjects, SPRING_BOOT);
|
||||
remove(newProjects, BOOT_STARTER_ARTIFACT_ID);
|
||||
remove(newProjects, BOOT_STARTER_PARENT_ARTIFACT_ID);
|
||||
remove(newProjects, BOOT_DEPENDENCIES_ARTIFACT_ID);
|
||||
add(newProjects, SPRING_BOOT, version);
|
||||
add(newProjects, BOOT_STARTER_ARTIFACT_ID, version);
|
||||
add(newProjects, BOOT_STARTER_PARENT_ARTIFACT_ID, version);
|
||||
add(newProjects, BOOT_DEPENDENCIES_ARTIFACT_ID, version);
|
||||
}
|
||||
|
||||
private void updateBuildVersions(Set<Project> newProjects, String version) {
|
||||
remove(newProjects, BUILD_ARTIFACT_ID);
|
||||
remove(newProjects, CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID);
|
||||
add(newProjects, BUILD_ARTIFACT_ID, version);
|
||||
add(newProjects, CLOUD_DEPENDENCIES_PARENT_ARTIFACT_ID, version);
|
||||
}
|
||||
|
||||
private void updateSpringCloudVersions(Set<Project> newProjects, String version) {
|
||||
remove(newProjects, CLOUD_DEPENDENCIES_ARTIFACT_ID);
|
||||
remove(newProjects, CLOUD_ARTIFACT_ID);
|
||||
remove(newProjects, CLOUD_RELEASE_ARTIFACT_ID);
|
||||
remove(newProjects, CLOUD_STARTER_ARTIFACT_ID);
|
||||
remove(newProjects, CLOUD_STARTER_PARENT_ARTIFACT_ID);
|
||||
add(newProjects, CLOUD_DEPENDENCIES_ARTIFACT_ID, version);
|
||||
add(newProjects, CLOUD_ARTIFACT_ID, version);
|
||||
add(newProjects, CLOUD_RELEASE_ARTIFACT_ID, version);
|
||||
add(newProjects, CLOUD_STARTER_ARTIFACT_ID, version);
|
||||
add(newProjects, CLOUD_STARTER_PARENT_ARTIFACT_ID, version);
|
||||
}
|
||||
|
||||
private void add(Set<Project> projects, String key, String value) {
|
||||
projects.add(new Project(key, value));
|
||||
}
|
||||
|
||||
private void remove(Set<Project> projects, String expectedProjectName) {
|
||||
projects.removeIf(project -> expectedProjectName.equals(project.name));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.docs;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.docs.CustomProjectDocumentationUpdater;
|
||||
import releaser.internal.git.ProjectGitHandler;
|
||||
import releaser.internal.project.ProjectVersion;
|
||||
import releaser.internal.project.Projects;
|
||||
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
class SpringCloudCustomProjectDocumentationUpdater
|
||||
implements CustomProjectDocumentationUpdater {
|
||||
|
||||
private static final Logger log = LoggerFactory
|
||||
.getLogger(SpringCloudCustomProjectDocumentationUpdater.class);
|
||||
|
||||
private final ProjectGitHandler gitHandler;
|
||||
|
||||
private final ReleaserProperties releaserProperties;
|
||||
|
||||
SpringCloudCustomProjectDocumentationUpdater(ProjectGitHandler gitHandler,
|
||||
ReleaserProperties releaserProperties) {
|
||||
this.gitHandler = gitHandler;
|
||||
this.releaserProperties = releaserProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the documentation repository if current release train version is greater or
|
||||
* equal than the one stored in the repo.
|
||||
* @param currentProject project to update the docs repo for
|
||||
* @param bomBranch the bom project branch
|
||||
* @return {@link File cloned temporary directory} - {@code null} if wrong version is
|
||||
* used
|
||||
*/
|
||||
@Override
|
||||
public File updateDocsRepoForReleaseTrain(File clonedDocumentationProject,
|
||||
ProjectVersion currentProject, Projects projects, String bomBranch) {
|
||||
log.debug("Cloning the doc project to [{}]", clonedDocumentationProject);
|
||||
ProjectVersion releaseTrainProject = new ProjectVersion(
|
||||
this.releaserProperties.getMetaRelease().getReleaseTrainProjectName(),
|
||||
branchToReleaseVersion(bomBranch));
|
||||
File currentReleaseFolder = new File(clonedDocumentationProject, currentFolder(
|
||||
releaseTrainProject.projectName, releaseTrainProject.version));
|
||||
// remove the old way
|
||||
removeAFolderWithRedirection(currentReleaseFolder);
|
||||
File docsRepo = updateTheDocsRepo(releaseTrainProject, clonedDocumentationProject,
|
||||
currentReleaseFolder);
|
||||
return pushChanges(docsRepo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the documentation repository if current release train version is greater or
|
||||
* equal than the one stored in the repo.
|
||||
* @param currentProject project to update the docs repo for
|
||||
* @return {@link File cloned temporary directory} - {@code null} if wrong version is
|
||||
* used
|
||||
*/
|
||||
@Override
|
||||
public File updateDocsRepoForSingleProject(File clonedDocumentationProject,
|
||||
ProjectVersion currentProject, Projects projects) {
|
||||
if (!projects.containsProject(currentProject.projectName)) {
|
||||
log.warn(
|
||||
"Can't update the documentation repo for project [{}] cause it's not present on the projects list {}",
|
||||
currentProject.projectName, projects);
|
||||
return clonedDocumentationProject;
|
||||
}
|
||||
log.info("Updating link to documentation for project [{}]",
|
||||
currentProject.projectName);
|
||||
ProjectVersion projectVersion = projects.forName(currentProject.projectName);
|
||||
File currentProjectReleaseFolder = new File(clonedDocumentationProject,
|
||||
currentFolder(projectVersion.projectName, projectVersion.version));
|
||||
removeAFolderWithRedirection(currentProjectReleaseFolder);
|
||||
try {
|
||||
updateTheDocsRepo(projectVersion, clonedDocumentationProject,
|
||||
currentProjectReleaseFolder);
|
||||
log.info("Processed [{}] for project with name [{}]",
|
||||
currentProjectReleaseFolder, projectVersion.projectName);
|
||||
}
|
||||
catch (Exception ex) {
|
||||
log.warn("Exception occurred while trying o update the symlink of a project ["
|
||||
+ projectVersion.projectName + "]", ex);
|
||||
}
|
||||
return pushChanges(clonedDocumentationProject);
|
||||
}
|
||||
|
||||
private void removeAFolderWithRedirection(File currentReleaseFolder) {
|
||||
if (!isSymbolinkLink(currentReleaseFolder)) {
|
||||
FileSystemUtils.deleteRecursively(currentReleaseFolder);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isSymbolinkLink(File currentFolder) {
|
||||
return Files.isSymbolicLink(currentFolder.toPath());
|
||||
}
|
||||
|
||||
private String currentFolder(String projectName, String projectVersion) {
|
||||
boolean releaseTrain = new ProjectVersion(projectName, projectVersion)
|
||||
.isReleaseTrain();
|
||||
// release train -> static/current
|
||||
// project -> static/spring-cloud-sleuth/current
|
||||
return releaseTrain ? "current"
|
||||
: (StringUtils.hasText(projectName) ? projectName : "") + "/current";
|
||||
}
|
||||
|
||||
String linkToVersion(File file) {
|
||||
if (Files.isSymbolicLink(file.toPath())) {
|
||||
try {
|
||||
Path path = Files.readSymbolicLink(file.toPath());
|
||||
// current -> Hoxton.SR2
|
||||
// spring-cloud-sleuth/current -> spring-cloud-sleuth/1.2.3.RELEASE
|
||||
return folderName(path.toString());
|
||||
}
|
||||
catch (IOException ex) {
|
||||
throw new IllegalStateException(ex);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private String folderName(String path) {
|
||||
int last = path.lastIndexOf(File.separator);
|
||||
return last > 0 ? path.substring(last + 1) : path;
|
||||
}
|
||||
|
||||
private String concreteVersionFolder(ProjectVersion projectVersion) {
|
||||
String projectName = projectVersion.projectName;
|
||||
boolean releaseTrain = projectVersion.isReleaseTrain();
|
||||
// release train -> static/Hoxton.SR2/
|
||||
// project -> static/spring-cloud-sleuth/1.2.3.RELEASE/
|
||||
String prefix = releaseTrain ? projectVersion.version
|
||||
: (projectName + "/" + projectVersion.version);
|
||||
return prefix + "/";
|
||||
}
|
||||
|
||||
private File pushChanges(File docsRepo) {
|
||||
this.gitHandler.pushCurrentBranch(docsRepo);
|
||||
log.info("Committed and pushed changes to the documentation project");
|
||||
return docsRepo;
|
||||
}
|
||||
|
||||
private File updateTheDocsRepo(ProjectVersion projectVersion,
|
||||
File documentationProject, File currentVersionFolder) {
|
||||
try {
|
||||
String storedVersion = linkToVersion(currentVersionFolder);
|
||||
String currentVersion = projectVersion.version;
|
||||
boolean newerVersion = StringUtils.isEmpty(storedVersion)
|
||||
|| isMoreMature(storedVersion, currentVersion);
|
||||
if (!newerVersion) {
|
||||
log.info("Current version [{}] is not newer than the stored one [{}]",
|
||||
currentVersion, storedVersion);
|
||||
return documentationProject;
|
||||
}
|
||||
boolean deleted = Files.deleteIfExists(currentVersionFolder.toPath())
|
||||
|| FileSystemUtils.deleteRecursively(currentVersionFolder.toPath());
|
||||
if (deleted) {
|
||||
log.info("Deleted current version folder link at [{}]",
|
||||
currentVersionFolder);
|
||||
}
|
||||
boolean creatingParentDirs = currentVersionFolder.getParentFile().mkdirs();
|
||||
if (!creatingParentDirs) {
|
||||
log.warn("Failed to create parent directory of [{}]",
|
||||
currentVersionFolder);
|
||||
}
|
||||
File newTarget = new File(projectVersion.version);
|
||||
Files.createSymbolicLink(currentVersionFolder.toPath(), newTarget.toPath());
|
||||
log.info("Updated the link [{}] to point to [{}]",
|
||||
currentVersionFolder.toPath(),
|
||||
Files.readSymbolicLink(currentVersionFolder.toPath()));
|
||||
return commitChanges(currentVersion, documentationProject);
|
||||
}
|
||||
catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isMoreMature(String storedVersion, String currentVersion) {
|
||||
return new ProjectVersion("project", currentVersion)
|
||||
.isMoreMature(new ProjectVersion("project", storedVersion));
|
||||
}
|
||||
|
||||
private String branchToReleaseVersion(String branch) {
|
||||
if (branch.startsWith("v")) {
|
||||
return branch.substring(1);
|
||||
}
|
||||
return branch;
|
||||
}
|
||||
|
||||
private File commitChanges(String currentVersion, File documentationProject)
|
||||
throws IOException {
|
||||
log.info("Updated the symbolic links");
|
||||
this.gitHandler.commit(documentationProject,
|
||||
"Updating the link to the current version to [" + currentVersion + "]");
|
||||
return documentationProject;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.docs;
|
||||
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.git.ProjectGitHandler;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
class SpringCloudDocsConfiguration {
|
||||
|
||||
@Bean
|
||||
SpringCloudCustomProjectDocumentationUpdater springCloudCustomProjectDocumentationUpdater(
|
||||
ProjectGitHandler handler, ReleaserProperties releaserProperties) {
|
||||
return new SpringCloudCustomProjectDocumentationUpdater(handler,
|
||||
releaserProperties);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.github;
|
||||
|
||||
import releaser.internal.ReleaserProperties;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
class SpringCloudGithubConfiguration {
|
||||
|
||||
@Bean
|
||||
SpringCloudGithubIssues springCloudGithubIssues(
|
||||
ReleaserProperties releaserProperties) {
|
||||
return new SpringCloudGithubIssues(releaserProperties);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.github;
|
||||
|
||||
import com.jcabi.github.Github;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.github.CustomGithubIssues;
|
||||
import releaser.internal.github.GithubIssueFiler;
|
||||
import releaser.internal.project.ProjectVersion;
|
||||
import releaser.internal.project.Projects;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
class SpringCloudGithubIssues implements CustomGithubIssues {
|
||||
|
||||
private static final String GITHUB_ISSUE_TITLE = "Upgrade to Spring Cloud %s";
|
||||
|
||||
private final GithubIssueFiler githubIssueFiler;
|
||||
|
||||
private final ReleaserProperties properties;
|
||||
|
||||
SpringCloudGithubIssues(ReleaserProperties properties) {
|
||||
this.githubIssueFiler = new GithubIssueFiler(properties);
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
SpringCloudGithubIssues(Github github, ReleaserProperties properties) {
|
||||
this.githubIssueFiler = new GithubIssueFiler(github, properties);
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileIssueInSpringGuides(Projects projects, ProjectVersion version) {
|
||||
String user = "spring-guides";
|
||||
String repo = "getting-started-guides";
|
||||
this.githubIssueFiler.fileAGitHubIssue(user, repo, version, issueTitle(),
|
||||
guidesIssueText(projects));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fileIssueInStartSpringIo(Projects projects, ProjectVersion version) {
|
||||
String user = "spring-io";
|
||||
String repo = "start.spring.io";
|
||||
this.githubIssueFiler.fileAGitHubIssue(user, repo, version, issueTitle(),
|
||||
startSpringIoIssueText(projects));
|
||||
}
|
||||
|
||||
private String issueTitle() {
|
||||
return String.format(GITHUB_ISSUE_TITLE, StringUtils.capitalize(parsedVersion()));
|
||||
}
|
||||
|
||||
private String parsedVersion() {
|
||||
String version = this.properties.getPom().getBranch();
|
||||
if (version.startsWith("v")) {
|
||||
return version.substring(1);
|
||||
}
|
||||
return version;
|
||||
}
|
||||
|
||||
private String startSpringIoIssueText(Projects projects) {
|
||||
String springBootVersion = projects.containsProject("spring-boot")
|
||||
? projects.forName("spring-boot").version : "";
|
||||
return "Release train ["
|
||||
+ this.properties.getMetaRelease().getReleaseTrainProjectName()
|
||||
+ "] in version [" + parsedVersion()
|
||||
+ "] released with the Spring Boot version [`" + springBootVersion + "`]";
|
||||
}
|
||||
|
||||
private String guidesIssueText(Projects projects) {
|
||||
StringBuilder builder = new StringBuilder().append("Release train [")
|
||||
.append(this.properties.getMetaRelease().getReleaseTrainProjectName())
|
||||
.append("] in version [").append(parsedVersion())
|
||||
.append("] released with the following projects:").append("\n\n");
|
||||
projects.forEach(project -> builder.append(project.projectName).append(" : ")
|
||||
.append("`").append(project.version).append("`").append("\n"));
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
}
|
||||
123
projects/spring-cloud/src/main/resources/application.yml
Normal file
@@ -0,0 +1,123 @@
|
||||
spring:
|
||||
main:
|
||||
web-application-type: none
|
||||
datasource:
|
||||
url: jdbc:h2:mem:${random.uuid}
|
||||
jackson:
|
||||
deserialization:
|
||||
FAIL_ON_UNKNOWN_PROPERTIES: true
|
||||
releaser:
|
||||
# working-dir:
|
||||
post-release-tasks-only: false
|
||||
skip-post-release-tasks: false
|
||||
flow:
|
||||
default-enabled: true
|
||||
git:
|
||||
release-train-bom-url: https://github.com/spring-cloud/spring-cloud-release
|
||||
documentation-url: https://github.com/spring-cloud/spring-cloud-static
|
||||
spring-project-url: https://github.com/spring-projects/spring-cloud
|
||||
test-samples-project-url: https://github.com/spring-cloud/spring-cloud-core-tests
|
||||
release-train-docs-url: https://github.com/spring-cloud-samples/scripts
|
||||
release-train-wiki-url: https://github.com/spring-projects/spring-cloud.wiki
|
||||
documentation-branch: gh-pages
|
||||
spring-project-branch: gh-pages
|
||||
test-samples-branch: master
|
||||
release-train-docs-branch: master
|
||||
release-train-wiki-page-prefix: Spring-Cloud
|
||||
# clone-destination-dir:
|
||||
fetch-versions-from-git: true
|
||||
# oauth-token:
|
||||
# username:
|
||||
# password:
|
||||
number-of-checked-milestones: 50
|
||||
update-documentation-repo: true
|
||||
update-github-milestones: true
|
||||
update-spring-guides: true
|
||||
update-start-spring-io: true
|
||||
update-spring-project: true
|
||||
run-updated-samples: true
|
||||
update-release-train-docs: true
|
||||
update-release-train-wiki: true
|
||||
update-all-test-samples: true
|
||||
all-test-sample-urls:
|
||||
spring-cloud-sleuth:
|
||||
- https://github.com/spring-cloud-samples/sleuth-issues
|
||||
- https://github.com/spring-cloud-samples/sleuth-documentation-apps
|
||||
spring-cloud-contract:
|
||||
- https://github.com/spring-cloud-samples/spring-cloud-contract-samples
|
||||
- https://github.com/spring-cloud-samples/the-legacy-app
|
||||
- https://github.com/spring-cloud-samples/sc-contract-car-rental
|
||||
pom:
|
||||
branch: master
|
||||
pom-with-boot-starter-parent: spring-cloud-starter-parent/pom.xml
|
||||
this-train-bom: spring-cloud-dependencies/pom.xml
|
||||
bom-version-pattern: "^(spring-cloud-.*)\\.version$"
|
||||
ignored-pom-regex:
|
||||
- "^.*\\.git/.*$"
|
||||
- "^.*spring-cloud-contract-maven-plugin/src/test/projects/.*$"
|
||||
- "^.*spring-cloud-contract-maven-plugin/target/.*$"
|
||||
- "^.*src/test/bats/.*$"
|
||||
- "^.*samples/standalone/[a-z]+/.*$"
|
||||
maven:
|
||||
build-command: "./mvnw clean install -B -Pdocs {{systemProps}}"
|
||||
deploy-command: "./mvnw deploy -DskipTests -B -Pfast,deploy {{systemProps}}"
|
||||
deploy-guides-command: "./mvnw clean verify deploy -B -Pguides,integration -pl guides {{systemProps}}"
|
||||
publish-docs-commands:
|
||||
- "mkdir -p target"
|
||||
- "wget https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh -O target/gh-pages.sh"
|
||||
- "chmod +x target/gh-pages.sh"
|
||||
- "./target/gh-pages.sh -v {{version}} -c"
|
||||
generate-release-train-docs-command: "bash release_train.sh --retrieveversions --version {{version}} --ghpages --auto"
|
||||
system-properties: ""
|
||||
wait-time-in-minutes: 20
|
||||
bash:
|
||||
build-command: 'echo "{{systemProps}}"'
|
||||
deploy-command: 'echo "{{systemProps}}"'
|
||||
deploy-guides-command: 'echo "{{systemProps}}"'
|
||||
publish-docs-commands:
|
||||
- 'echo "{{systemProps}}"'
|
||||
generate-release-train-docs-command: 'echo "{{systemProps}}"'
|
||||
system-properties: ""
|
||||
wait-time-in-minutes: 20
|
||||
gradle:
|
||||
gradle-props-substitution:
|
||||
bootVersion: spring-boot
|
||||
BOOT_VERSION: spring-boot
|
||||
bomVersion: spring-cloud-release
|
||||
BOM_VERSION: spring-cloud-release
|
||||
springCloudBuildVersion: spring-cloud-build
|
||||
ignored-gradle-regex:
|
||||
- "^.*spring-cloud-contract-maven-plugin/src/test/projects/.*$"
|
||||
- "^.*spring-cloud-contract-maven-plugin/target/.*$"
|
||||
- "^.*src/test/bats/.*$"
|
||||
- "^.*samples/standalone/[a-z]+/.*$"
|
||||
build-command: "./gradlew clean build publishToMavenLocal --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}"
|
||||
deploy-command: "./gradlew publish --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}"
|
||||
deploy-guides-command: "./gradlew clean build deployGuides --console=plain -PnextVersion={{nextVersion}} -PoldVersion={{oldVersion}} -PcurrentVersion={{version}} {{systemProps}}"
|
||||
publish-docs-commands:
|
||||
- "echo 'TODO'"
|
||||
generate-release-train-docs-command: "echo 'TODO'"
|
||||
system-properties: ""
|
||||
wait-time-in-minutes: 20
|
||||
sagan:
|
||||
update-sagan: true
|
||||
template:
|
||||
enabled: true
|
||||
template-folder: cloud
|
||||
versions:
|
||||
all-versions-file-url: https://raw.githubusercontent.com/spring-io/start.spring.io/master/start-site/src/main/resources/application.yml
|
||||
bom-name: spring-cloud
|
||||
# fixed-versions:
|
||||
meta-release:
|
||||
enabled: false
|
||||
release-train-project-name: spring-cloud-release
|
||||
release-train-dependency-names:
|
||||
- spring-cloud
|
||||
- spring-cloud-dependencies
|
||||
- spring-cloud-starter
|
||||
- spring-cloud-starter-build
|
||||
git-org-url: https://github.com/spring-cloud
|
||||
projects-to-skip:
|
||||
- spring-boot
|
||||
- spring-cloud-stream
|
||||
- spring-cloud-task
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.mockito.Mockito;
|
||||
import releaser.internal.options.Parser;
|
||||
import releaser.internal.spring.ExecutionResultHandler;
|
||||
import releaser.internal.spring.SpringReleaser;
|
||||
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@SpringBootTest(
|
||||
classes = { ReleaserApplicationTests.Config.class, ReleaserApplication.class },
|
||||
properties = { "releaser.sagan.update-sagan=false" })
|
||||
class ReleaserApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
static class Config {
|
||||
|
||||
@Bean
|
||||
SpringReleaser mockReleaser() {
|
||||
return Mockito.mock(SpringReleaser.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ExecutionResultHandler mockExecutionResultHandler() {
|
||||
return Mockito.mock(ExecutionResultHandler.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
Parser mockParser() {
|
||||
return Mockito.mock(Parser.class);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import releaser.internal.ReleaserProperties;
|
||||
|
||||
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
|
||||
import org.springframework.boot.context.properties.bind.Binder;
|
||||
import org.springframework.boot.context.properties.source.MapConfigurationPropertySource;
|
||||
import org.springframework.core.io.FileSystemResource;
|
||||
|
||||
public class SpringCloudReleaserProperties {
|
||||
|
||||
public static ReleaserProperties get() {
|
||||
try {
|
||||
File releaserConfig = new File(SpringCloudReleaserProperties.class
|
||||
.getResource("/application.yml").toURI());
|
||||
YamlPropertiesFactoryBean yamlProcessor = new YamlPropertiesFactoryBean();
|
||||
yamlProcessor.setResources(new FileSystemResource(releaserConfig));
|
||||
Properties properties = yamlProcessor.getObject();
|
||||
ReleaserProperties releaserProperties = new Binder(
|
||||
new MapConfigurationPropertySource(properties.entrySet().stream()
|
||||
.collect(Collectors.toMap(e -> e.getKey().toString(),
|
||||
e -> e.getValue().toString()))))
|
||||
.bind("releaser", ReleaserProperties.class)
|
||||
.get();
|
||||
return releaserProperties;
|
||||
}
|
||||
catch (URISyntaxException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.buildsystem;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Test;
|
||||
import releaser.cloud.SpringCloudReleaserProperties;
|
||||
import releaser.internal.buildsystem.CustomBomParser;
|
||||
import releaser.internal.buildsystem.VersionsFromBom;
|
||||
import releaser.internal.buildsystem.VersionsFromBomBuilder;
|
||||
import releaser.internal.project.Project;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringCloudCustomMavenBomTests {
|
||||
|
||||
@Test
|
||||
public void should_add_boot_to_versions_when_version_is_created() {
|
||||
List<CustomBomParser> bomParsers = Collections
|
||||
.singletonList(new SpringCloudMavenBomParser());
|
||||
VersionsFromBom customVersionsFromBom = new VersionsFromBomBuilder()
|
||||
.releaserProperties(SpringCloudReleaserProperties.get())
|
||||
.parsers(bomParsers).projects(springCloudBuildProjects())
|
||||
.retrieveFromBom();
|
||||
customVersionsFromBom.setVersion("spring-boot", "1.2.3.RELEASE");
|
||||
|
||||
then(customVersionsFromBom.versionForProject("spring-boot"))
|
||||
.isEqualTo("1.2.3.RELEASE");
|
||||
then(customVersionsFromBom.versionForProject("spring-boot-starter-parent"))
|
||||
.isEqualTo("1.2.3.RELEASE");
|
||||
then(customVersionsFromBom.versionForProject("spring-boot-dependencies"))
|
||||
.isEqualTo("1.2.3.RELEASE");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_update_projects_for_boot() {
|
||||
VersionsFromBom versionsFromBom = mixedVersions().setVersion("spring-boot",
|
||||
"3.0.0");
|
||||
|
||||
then(versionsFromBom.versionForProject("spring-boot")).isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-boot-starter-parent"))
|
||||
.isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-boot-dependencies"))
|
||||
.isEqualTo("3.0.0");
|
||||
|
||||
versionsFromBom = mixedVersions().setVersion("spring-boot-starter-parent",
|
||||
"3.0.0");
|
||||
|
||||
then(versionsFromBom.versionForProject("spring-boot")).isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-boot-starter-parent"))
|
||||
.isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-boot-dependencies"))
|
||||
.isEqualTo("3.0.0");
|
||||
|
||||
versionsFromBom = mixedVersions().setVersion("spring-boot-dependencies", "3.0.0");
|
||||
|
||||
then(versionsFromBom.versionForProject("spring-boot")).isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-boot-starter-parent"))
|
||||
.isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-boot-dependencies"))
|
||||
.isEqualTo("3.0.0");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_update_projects_for_build() {
|
||||
VersionsFromBom versionsFromBom = mixedVersions().setVersion("spring-cloud-build",
|
||||
"3.0.0");
|
||||
|
||||
then(versionsFromBom.versionForProject("spring-cloud-build")).isEqualTo("3.0.0");
|
||||
|
||||
versionsFromBom = mixedVersions().setVersion("spring-cloud-build", "3.0.0");
|
||||
|
||||
then(versionsFromBom.versionForProject("spring-cloud-dependencies-parent"))
|
||||
.isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-cloud-dependencies"))
|
||||
.isEqualTo("Greenwich.RELEASE");
|
||||
|
||||
versionsFromBom = mixedVersions().setVersion("spring-cloud-dependencies-parent",
|
||||
"3.0.0");
|
||||
|
||||
then(versionsFromBom.versionForProject("spring-cloud-build")).isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-cloud-dependencies-parent"))
|
||||
.isEqualTo("3.0.0");
|
||||
then(versionsFromBom.versionForProject("spring-cloud-dependencies"))
|
||||
.isEqualTo("Greenwich.RELEASE");
|
||||
}
|
||||
|
||||
private VersionsFromBom mixedVersions() {
|
||||
return new VersionsFromBomBuilder()
|
||||
.releaserProperties(SpringCloudReleaserProperties.get())
|
||||
.parsers(Collections.singletonList(new SpringCloudMavenBomParser()))
|
||||
.projects(mixedProjects()).merged();
|
||||
}
|
||||
|
||||
Set<Project> springCloudBuildProjects() {
|
||||
Set<Project> projects = new HashSet<>();
|
||||
projects.add(new Project("spring-cloud-build", "1.2.3.BUILD-SNAPSHOT"));
|
||||
return projects;
|
||||
}
|
||||
|
||||
Set<Project> mixedProjects() {
|
||||
Set<Project> projects = new HashSet<>();
|
||||
projects.add(new Project("foo", "1.0.0.BUILD-SNAPSHOT"));
|
||||
projects.add(new Project("fooBar", "1.0.0.RELEASE"));
|
||||
projects.add(new Project("spring-boot", "1.0.0"));
|
||||
projects.add(new Project("spring-cloud-build", "2.0.0"));
|
||||
projects.add(new Project("spring-cloud-release", "Greenwich.RELEASE"));
|
||||
projects.add(new Project("spring-cloud-dependencies", "Greenwich.RELEASE"));
|
||||
projects.add(new Project("spring-cloud-stream-starters", "Fishtown.RELEASE"));
|
||||
return projects;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.buildsystem;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.eclipse.jgit.api.errors.GitAPIException;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import releaser.cloud.SpringCloudReleaserProperties;
|
||||
import releaser.cloud.docs.TestUtils;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.buildsystem.BomParser;
|
||||
import releaser.internal.buildsystem.MavenBomParserAccessor;
|
||||
import releaser.internal.buildsystem.VersionsFromBom;
|
||||
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
import static org.assertj.core.api.BDDAssertions.thenThrownBy;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringCloudMavenBomParserTests {
|
||||
|
||||
@Rule
|
||||
public TemporaryFolder tmp = new TemporaryFolder();
|
||||
|
||||
File tmpFolder;
|
||||
|
||||
File springCloudReleaseProject;
|
||||
|
||||
ReleaserProperties properties = SpringCloudReleaserProperties.get();
|
||||
|
||||
@Before
|
||||
public void setup() throws URISyntaxException, IOException, GitAPIException {
|
||||
this.tmpFolder = this.tmp.newFolder();
|
||||
TestUtils.prepareLocalRepo();
|
||||
FileSystemUtils.copyRecursively(file("/projects"), this.tmpFolder);
|
||||
this.springCloudReleaseProject = new File(this.tmpFolder,
|
||||
"/spring-cloud-release");
|
||||
}
|
||||
|
||||
private File file(String relativePath) throws URISyntaxException {
|
||||
return new File(
|
||||
SpringCloudMavenBomParserTests.class.getResource(relativePath).toURI());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_throw_exception_when_null_is_passed_to_boot() {
|
||||
this.properties.getPom().setPomWithBootStarterParent(null);
|
||||
this.properties.getPom().setThisTrainBom(null);
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
thenThrownBy(() -> parser.versionsFromBom(this.springCloudReleaseProject))
|
||||
.isInstanceOf(IllegalStateException.class)
|
||||
.hasMessageContaining("Pom is not present");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_populate_sc_release_version() {
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
String scReleaseVersion = parser.versionsFromBom(this.springCloudReleaseProject)
|
||||
.versionForProject("spring-cloud-release");
|
||||
|
||||
then(scReleaseVersion).isNotBlank();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_populate_boot_version() {
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
String bootVersion = parser.versionsFromBom(this.springCloudReleaseProject)
|
||||
.versionForProject("spring-boot");
|
||||
|
||||
then(bootVersion).isNotBlank();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_throw_exception_when_cloud_pom_is_missing() {
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
thenThrownBy(() -> parser.versionsFromBom(new File(".")))
|
||||
.isInstanceOf(IllegalStateException.class)
|
||||
.hasMessageContaining("Pom is not present");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_throw_exception_when_null_is_passed_to_cloud() {
|
||||
this.properties.getPom().setPomWithBootStarterParent(null);
|
||||
this.properties.getPom().setThisTrainBom(null);
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
thenThrownBy(() -> parser.versionsFromBom(this.springCloudReleaseProject))
|
||||
.isInstanceOf(IllegalStateException.class)
|
||||
.hasMessageContaining("Pom is not present");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_throw_exception_when_cloud_version_is_missing_in_pom() {
|
||||
this.properties.getPom().setPomWithBootStarterParent("pom.xml");
|
||||
this.properties.getPom().setThisTrainBom("pom.xml");
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
thenThrownBy(() -> parser.versionsFromBom(this.springCloudReleaseProject))
|
||||
.isInstanceOf(IllegalStateException.class).hasMessageContaining(
|
||||
"The pom doesn't have a [spring-cloud-dependencies-parent] artifact id");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_populate_cloud_version() {
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
VersionsFromBom cloudVersionsFromBom = parser
|
||||
.versionsFromBom(this.springCloudReleaseProject);
|
||||
|
||||
thenAllCloudVersionsSet(cloudVersionsFromBom);
|
||||
}
|
||||
|
||||
private void thenAllCloudVersionsSet(VersionsFromBom cloudVersionsFromBom) {
|
||||
Arrays.asList("spring-cloud-bus", "spring-cloud-contract",
|
||||
"spring-cloud-cloudfoundry", "spring-cloud-commons",
|
||||
"spring-cloud-config", "spring-cloud-netflix", "spring-cloud-security",
|
||||
"spring-cloud-consul", "spring-cloud-sleuth", "spring-cloud-stream",
|
||||
"spring-cloud-task", "spring-cloud-vault", "spring-cloud-zookeeper")
|
||||
.forEach(s -> then(cloudVersionsFromBom.versionForProject(s))
|
||||
.isNotBlank());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_populate_boot_and_cloud_version() {
|
||||
BomParser parser = MavenBomParserAccessor.bomParser(this.properties,
|
||||
new SpringCloudMavenBomParser());
|
||||
|
||||
VersionsFromBom cloudVersionsFromBom = parser
|
||||
.versionsFromBom(this.springCloudReleaseProject);
|
||||
|
||||
then(cloudVersionsFromBom.versionForProject("spring-boot")).isNotBlank();
|
||||
then(cloudVersionsFromBom.versionForProject("spring-cloud-build")).isNotBlank();
|
||||
thenAllCloudVersionsSet(cloudVersionsFromBom);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.buildsystem;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.junit.Test;
|
||||
import releaser.cloud.SpringCloudReleaserProperties;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.buildsystem.MavenBomParserAccessor;
|
||||
import releaser.internal.buildsystem.ProjectPomUpdater;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringCloudProjectPomUpdaterTests {
|
||||
|
||||
@Test
|
||||
public void should_convert_fixed_versions_to_updated_fixed_versions() {
|
||||
ReleaserProperties properties = SpringCloudReleaserProperties.get();
|
||||
properties.getFixedVersions().put("spring-cloud-task", "2.0.0.RELEASE");
|
||||
properties.getFixedVersions().put("spring-cloud-openfeign",
|
||||
"2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-consul", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-zookeeper",
|
||||
"2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-stream", "Elmhurst.RELEASE");
|
||||
properties.getFixedVersions().put("spring-cloud-config", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-cloudfoundry",
|
||||
"2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-netflix", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-vault", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-security",
|
||||
"2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-commons", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-sleuth", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-aws", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-contract",
|
||||
"2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-release",
|
||||
"Finchley.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-build", "2.0.3.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-bus", "2.0.1.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-function",
|
||||
"1.0.0.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-cloud-starter-build",
|
||||
"Finchley.BUILD-SNAPSHOT");
|
||||
properties.getFixedVersions().put("spring-boot", "2.0.3.RELEASE");
|
||||
properties.getFixedVersions().put("spring-cloud-gateway", "2.0.1.BUILD-SNAPSHOT");
|
||||
ProjectPomUpdater updater = new ProjectPomUpdater(properties,
|
||||
Collections.singletonList(MavenBomParserAccessor.bomParser(properties,
|
||||
new SpringCloudMavenBomParser())));
|
||||
|
||||
Map<String, String> fixedVersions = updater.fixedVersions().stream()
|
||||
.collect(Collectors.toMap(projectVersion -> projectVersion.projectName,
|
||||
projectVersion -> projectVersion.version));
|
||||
|
||||
BDDAssertions.then(fixedVersions).containsEntry("spring-boot", "2.0.3.RELEASE")
|
||||
.containsEntry("spring-boot-dependencies", "2.0.3.RELEASE")
|
||||
.containsEntry("spring-boot-starter", "2.0.3.RELEASE")
|
||||
.containsEntry("spring-cloud-build", "2.0.3.BUILD-SNAPSHOT")
|
||||
.containsEntry("spring-cloud-dependencies-parent", "2.0.3.BUILD-SNAPSHOT")
|
||||
.containsEntry("spring-cloud-dependencies", "Finchley.BUILD-SNAPSHOT")
|
||||
.containsEntry("spring-cloud-release", "Finchley.BUILD-SNAPSHOT")
|
||||
.containsEntry("spring-cloud", "Finchley.BUILD-SNAPSHOT");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.docs;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collections;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.mockito.BDDMockito;
|
||||
import releaser.cloud.SpringCloudReleaserProperties;
|
||||
import releaser.cloud.github.SpringCloudGithubIssuesAccessor;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.docs.DocumentationUpdater;
|
||||
import releaser.internal.git.ProjectGitHandler;
|
||||
import releaser.internal.github.ProjectGitHubHandler;
|
||||
import releaser.internal.project.ProjectVersion;
|
||||
import releaser.internal.project.Projects;
|
||||
import releaser.internal.template.TemplateGenerator;
|
||||
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringCloudCustomProjectDocumentationUpdaterTests {
|
||||
|
||||
@Rule
|
||||
public TemporaryFolder tmp = new TemporaryFolder();
|
||||
|
||||
File project;
|
||||
|
||||
File tmpFolder;
|
||||
|
||||
ProjectGitHandler handler;
|
||||
|
||||
ProjectGitHubHandler gitHubHandler;
|
||||
|
||||
File clonedDocProject;
|
||||
|
||||
ReleaserProperties properties = SpringCloudReleaserProperties.get();
|
||||
|
||||
@Before
|
||||
public void setup() throws IOException, URISyntaxException {
|
||||
this.tmpFolder = this.tmp.newFolder();
|
||||
this.project = new File(SpringCloudCustomProjectDocumentationUpdater.class
|
||||
.getResource("/projects/spring-cloud-static").toURI());
|
||||
TestUtils.prepareLocalRepo();
|
||||
FileSystemUtils.copyRecursively(file("/projects"), this.tmpFolder);
|
||||
this.properties.getGit().setDocumentationUrl(
|
||||
file("/projects/spring-cloud-static/").toURI().toString());
|
||||
this.handler = new ProjectGitHandler(this.properties);
|
||||
this.clonedDocProject = this.handler.cloneDocumentationProject();
|
||||
this.gitHubHandler = new ProjectGitHubHandler(this.properties,
|
||||
Collections.singletonList(
|
||||
SpringCloudGithubIssuesAccessor.springCloud(this.properties)));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_update_current_version_in_the_docs_if_current_release_is_not_ga_or_sr() {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Angel.M7");
|
||||
ReleaserProperties properties = SpringCloudReleaserProperties.get();
|
||||
|
||||
File updatedDocs = projectDocumentationUpdater(properties)
|
||||
.updateDocsRepo(projects(), releaseTrainVersion, "vAngel.M7");
|
||||
|
||||
then(updatedDocs).isNull();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private DocumentationUpdater projectDocumentationUpdater(
|
||||
ReleaserProperties properties) {
|
||||
return new DocumentationUpdater(this.handler, properties,
|
||||
templateGenerator(properties),
|
||||
Collections.singletonList(
|
||||
new SpringCloudCustomProjectDocumentationUpdater(this.handler,
|
||||
properties)));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private TemplateGenerator templateGenerator(ReleaserProperties properties) {
|
||||
return new TemplateGenerator(properties, this.gitHubHandler);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_update_current_version_in_the_docs_if_current_release_starts_with_v_and_then_lower_letter_than_the_stored_release()
|
||||
throws URISyntaxException, IOException {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Finchley.SR33");
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getGit().setDocumentationUrl(
|
||||
file("/projects/spring-cloud-static/").toURI().toString());
|
||||
|
||||
File updatedDocs = new SpringCloudCustomProjectDocumentationUpdater(
|
||||
new ProjectGitHandler(properties), properties)
|
||||
.updateDocsRepoForReleaseTrain(this.clonedDocProject,
|
||||
releaseTrainVersion, projects(), "vFinchley.SR33");
|
||||
|
||||
BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath())
|
||||
.doesNotExist();
|
||||
Path current = new File(updatedDocs, "current/").toPath();
|
||||
BDDAssertions.then(current).isSymbolicLink();
|
||||
BDDAssertions.then(Files.readSymbolicLink(current).toString())
|
||||
.isEqualTo("Finchley.SR33");
|
||||
|
||||
releaseTrainVersion = new ProjectVersion("spring-cloud-release", "Angel.SR33");
|
||||
properties = new ReleaserProperties();
|
||||
properties.getGit().setDocumentationUrl(
|
||||
file("/projects/spring-cloud-static/").toURI().toString());
|
||||
|
||||
updatedDocs = new SpringCloudCustomProjectDocumentationUpdater(
|
||||
new ProjectGitHandler(properties), properties)
|
||||
.updateDocsRepoForReleaseTrain(this.clonedDocProject,
|
||||
releaseTrainVersion, projects(), "vAngel.SR33");
|
||||
|
||||
BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath())
|
||||
.doesNotExist();
|
||||
current = new File(updatedDocs, "current/").toPath();
|
||||
BDDAssertions.then(current).isSymbolicLink();
|
||||
BDDAssertions.then(Files.readSymbolicLink(current).toString())
|
||||
.isNotEqualTo("Angel.SR33");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_commit_if_the_same_version_is_already_there() {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Dalston.SR3");
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
|
||||
ProjectGitHandler handler = BDDMockito.spy(new ProjectGitHandler(properties));
|
||||
|
||||
new SpringCloudCustomProjectDocumentationUpdater(handler, properties)
|
||||
.updateDocsRepoForReleaseTrain(this.clonedDocProject, releaseTrainVersion,
|
||||
projects(), "vDalston.SR3");
|
||||
|
||||
BDDMockito.then(handler).should(BDDMockito.never())
|
||||
.commit(BDDMockito.any(File.class), BDDMockito.anyString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_update_current_version_in_the_docs_if_current_release_starts_with_lower_letter_than_the_stored_release()
|
||||
throws IOException {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Angel.SR33");
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
|
||||
|
||||
File updatedDocs = new SpringCloudCustomProjectDocumentationUpdater(
|
||||
new ProjectGitHandler(properties), properties)
|
||||
.updateDocsRepoForReleaseTrain(this.clonedDocProject,
|
||||
releaseTrainVersion, projects(), "Angel.SR33");
|
||||
|
||||
BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath())
|
||||
.doesNotExist();
|
||||
Path current = new File(updatedDocs, "current/").toPath();
|
||||
BDDAssertions.then(current).isSymbolicLink();
|
||||
BDDAssertions.then(Files.readSymbolicLink(current).toString())
|
||||
.isNotEqualTo("Angel.SR33");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_update_current_version_in_the_docs_if_current_release_starts_with_v_and_then_higher_letter_than_the_stored_release()
|
||||
throws IOException {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Finchley.SR33");
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getGit().setUpdateDocumentationRepo(true);
|
||||
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
|
||||
|
||||
File updatedDocs = projectDocumentationUpdater(properties)
|
||||
.updateDocsRepo(projects(), releaseTrainVersion, "vFinchley.SR33");
|
||||
|
||||
BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath())
|
||||
.doesNotExist();
|
||||
Path current = new File(updatedDocs, "current/").toPath();
|
||||
BDDAssertions.then(current).isSymbolicLink();
|
||||
BDDAssertions.then(Files.readSymbolicLink(current).toString())
|
||||
.isEqualTo("Finchley.SR33");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_update_current_version_in_the_docs_if_current_release_starts_with_higher_letter_than_the_stored_release()
|
||||
throws IOException {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Finchley.SR33");
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getGit().setUpdateDocumentationRepo(true);
|
||||
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
|
||||
|
||||
DocumentationUpdater updater = projectDocumentationUpdater(properties);
|
||||
ProjectVersion sleuthVersion = new ProjectVersion("spring-cloud-sleuth",
|
||||
"2.0.0.RELEASE");
|
||||
Projects bom = new Projects(sleuthVersion);
|
||||
File updatedDocs = updater.updateDocsRepo(bom, releaseTrainVersion,
|
||||
"vFinchley.SR33");
|
||||
|
||||
BDDAssertions.then(new File(updatedDocs, "current/index.html").toPath())
|
||||
.doesNotExist();
|
||||
Path current = new File(updatedDocs, "current/").toPath();
|
||||
BDDAssertions.then(current).isSymbolicLink();
|
||||
BDDAssertions.then(Files.readSymbolicLink(current).toString())
|
||||
.isEqualTo("Finchley.SR33");
|
||||
|
||||
updatedDocs = updater.updateDocsRepoForSingleProject(bom, sleuthVersion);
|
||||
|
||||
BDDAssertions.then(
|
||||
new File(updatedDocs, "spring-cloud-sleuth/current/index.html").toPath())
|
||||
.doesNotExist();
|
||||
current = new File(updatedDocs, "spring-cloud-sleuth/current/").toPath();
|
||||
BDDAssertions.then(current).isSymbolicLink();
|
||||
BDDAssertions.then(Files.readSymbolicLink(current).toString())
|
||||
.isEqualTo("2.0.0.RELEASE");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_update_current_version_in_the_docs_if_switch_is_off() {
|
||||
ProjectVersion releaseTrainVersion = new ProjectVersion("spring-cloud-release",
|
||||
"Finchley.SR33");
|
||||
ReleaserProperties properties = new ReleaserProperties();
|
||||
properties.getGit().setDocumentationUrl(this.clonedDocProject.toURI().toString());
|
||||
properties.getGit().setUpdateDocumentationRepo(false);
|
||||
|
||||
File updatedDocs = projectDocumentationUpdater(properties)
|
||||
.updateDocsRepo(projects(), releaseTrainVersion, "Finchley.SR33");
|
||||
|
||||
then(updatedDocs).isNull();
|
||||
}
|
||||
|
||||
private File file(String relativePath) throws URISyntaxException {
|
||||
return new File(SpringCloudCustomProjectDocumentationUpdater.class
|
||||
.getResource(relativePath).toURI());
|
||||
}
|
||||
|
||||
private Projects projects() {
|
||||
return new Projects(new ProjectVersion("spring-cloud-sleuth", "1.0.0.RELEASE"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.docs;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.eclipse.jgit.util.FileUtils;
|
||||
|
||||
public final class TestUtils {
|
||||
|
||||
private TestUtils() {
|
||||
throw new IllegalStateException("Can't instantiate a utility class");
|
||||
}
|
||||
|
||||
public static void prepareLocalRepo() throws IOException {
|
||||
prepareLocalRepo("target/test-classes/projects/", "spring-cloud");
|
||||
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-wiki");
|
||||
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-core-tests");
|
||||
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-release");
|
||||
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-consul");
|
||||
prepareLocalRepo("target/test-classes/projects/", "spring-cloud-static");
|
||||
}
|
||||
|
||||
private static void prepareLocalRepo(String buildDir, String repoPath)
|
||||
throws IOException {
|
||||
File dotGit = new File(buildDir + repoPath + "/.git");
|
||||
File git = new File(buildDir + repoPath + "/git");
|
||||
if (git.exists()) {
|
||||
if (dotGit.exists()) {
|
||||
FileUtils.delete(dotGit, FileUtils.RECURSIVE);
|
||||
}
|
||||
}
|
||||
git.renameTo(dotGit);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.github;
|
||||
|
||||
import com.jcabi.github.Github;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.github.CustomGithubIssues;
|
||||
|
||||
public class SpringCloudGithubIssuesAccessor {
|
||||
|
||||
public static CustomGithubIssues springCloud(Github github,
|
||||
ReleaserProperties releaserProperties) {
|
||||
return new SpringCloudGithubIssues(github, releaserProperties);
|
||||
}
|
||||
|
||||
public static CustomGithubIssues springCloud(ReleaserProperties releaserProperties) {
|
||||
return new SpringCloudGithubIssues(releaserProperties);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.github;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
|
||||
import com.jcabi.github.Coordinates;
|
||||
import com.jcabi.github.Github;
|
||||
import com.jcabi.github.Issue;
|
||||
import com.jcabi.github.Repo;
|
||||
import com.jcabi.github.Repos;
|
||||
import com.jcabi.github.mock.MkGithub;
|
||||
import org.junit.Before;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.mockito.BDDMockito;
|
||||
import releaser.cloud.SpringCloudReleaserProperties;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.github.CustomGithubIssues;
|
||||
import releaser.internal.project.ProjectVersion;
|
||||
import releaser.internal.project.Projects;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
import static org.assertj.core.api.BDDAssertions.thenThrownBy;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringCloudGithubIssuesTests {
|
||||
|
||||
@Rule
|
||||
public TemporaryFolder folder = new TemporaryFolder();
|
||||
|
||||
ReleaserProperties properties = SpringCloudReleaserProperties.get();
|
||||
|
||||
MkGithub github;
|
||||
|
||||
Repo repo;
|
||||
|
||||
@Before
|
||||
public void setup() throws IOException {
|
||||
this.github = github("spring-guides");
|
||||
this.properties.getGit().setOauthToken("a");
|
||||
this.repo = createGettingStartedGuides(this.github);
|
||||
}
|
||||
|
||||
public void setupStartSpringIo() throws IOException {
|
||||
this.github = github("spring-io");
|
||||
this.repo = createStartSpringIo(this.github);
|
||||
}
|
||||
|
||||
private MkGithub github(String login) throws IOException {
|
||||
return new MkGithub(login);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_do_anything_for_non_release_train_version() {
|
||||
Github github = BDDMockito.mock(Github.class);
|
||||
CustomGithubIssues githubIssues = new SpringCloudGithubIssues(github, properties);
|
||||
|
||||
githubIssues
|
||||
.fileIssueInSpringGuides(
|
||||
new Projects(new ProjectVersion("foo", "1.0.0.BUILD-SNAPSHOT"),
|
||||
new ProjectVersion("spring-cloud-build",
|
||||
"2.0.0.BUILD-SNAPSHOT")),
|
||||
new ProjectVersion("sc-release", "Edgware.BUILD-SNAPSHOT"));
|
||||
|
||||
BDDMockito.then(github).shouldHaveZeroInteractions();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_file_an_issue_for_release_version() throws IOException {
|
||||
CustomGithubIssues issues = new SpringCloudGithubIssues(github, properties);
|
||||
properties.getPom().setBranch("vEdgware.RELEASE");
|
||||
|
||||
issues.fileIssueInSpringGuides(
|
||||
new Projects(new ProjectVersion("spring-cloud-foo", "1.0.0.RELEASE"),
|
||||
new ProjectVersion("spring-cloud-build", "2.0.0.RELEASE"),
|
||||
new ProjectVersion("bar", "2.0.0.RELEASE"),
|
||||
new ProjectVersion("baz", "3.0.0.RELEASE")),
|
||||
new ProjectVersion("sc-release", "Edgware.RELEASE"));
|
||||
|
||||
Issue issue = this.github.repos()
|
||||
.get(new Coordinates.Simple("spring-guides", "getting-started-guides"))
|
||||
.issues().get(1);
|
||||
then(issue.exists()).isTrue();
|
||||
Issue.Smart smartIssue = new Issue.Smart(issue);
|
||||
then(smartIssue.title()).isEqualTo("Upgrade to Spring Cloud Edgware.RELEASE");
|
||||
then(smartIssue.body()).contains(
|
||||
"Release train [spring-cloud-release] in version [Edgware.RELEASE] released with the following projects")
|
||||
.contains("spring-cloud-foo : `1.0.0.RELEASE`")
|
||||
.contains("bar : `2.0.0.RELEASE`").contains("baz : `3.0.0.RELEASE`");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_throw_exception_when_no_token_was_passed() {
|
||||
properties.getGit().setOauthToken("");
|
||||
CustomGithubIssues issues = new SpringCloudGithubIssues(github, properties);
|
||||
|
||||
thenThrownBy(() -> issues.fileIssueInSpringGuides(
|
||||
new Projects(Collections.singletonList(
|
||||
new ProjectVersion("spring-cloud-build", "2.0.0.RELEASE"))),
|
||||
nonGaSleuthProject())).isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessageContaining(
|
||||
"You have to pass Github OAuth token for milestone closing to be operational");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_do_anything_for_non_release_train_version_when_updating_startspringio()
|
||||
throws IOException {
|
||||
setupStartSpringIo();
|
||||
Github github = BDDMockito.mock(Github.class);
|
||||
CustomGithubIssues issues = new SpringCloudGithubIssues(github, properties);
|
||||
|
||||
issues.fileIssueInStartSpringIo(
|
||||
new Projects(new ProjectVersion("foo", "1.0.0.BUILD-SNAPSHOT"),
|
||||
new ProjectVersion("spring-cloud-build", "2.0.0.RELEASE")),
|
||||
new ProjectVersion("sc-release", "Edgware.BUILD-SNAPSHOT"));
|
||||
|
||||
BDDMockito.then(github).shouldHaveZeroInteractions();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_file_an_issue_for_release_version_when_updating_startspringio()
|
||||
throws IOException {
|
||||
setupStartSpringIo();
|
||||
CustomGithubIssues issues = new SpringCloudGithubIssues(github, properties);
|
||||
properties.getPom().setBranch("vEdgware.RELEASE");
|
||||
|
||||
issues.fileIssueInStartSpringIo(
|
||||
new Projects(new ProjectVersion("spring-cloud-foo", "1.0.0.RELEASE"),
|
||||
new ProjectVersion("spring-cloud-build", "2.0.0.RELEASE"),
|
||||
new ProjectVersion("bar", "2.0.0.RELEASE"),
|
||||
new ProjectVersion("baz", "3.0.0.RELEASE"),
|
||||
new ProjectVersion("spring-boot", "1.2.3.RELEASE")),
|
||||
new ProjectVersion("sc-release", "Edgware.RELEASE"));
|
||||
|
||||
Issue issue = this.github.repos()
|
||||
.get(new Coordinates.Simple("spring-io", "start.spring.io")).issues()
|
||||
.get(1);
|
||||
then(issue.exists()).isTrue();
|
||||
Issue.Smart smartIssue = new Issue.Smart(issue);
|
||||
then(smartIssue.title()).isEqualTo("Upgrade to Spring Cloud Edgware.RELEASE");
|
||||
then(smartIssue.body()).contains(
|
||||
"Release train [spring-cloud-release] in version [Edgware.RELEASE] released with the Spring Boot version [`1.2.3.RELEASE`]");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_throw_exception_when_no_token_was_passed_when_updating_startspringio()
|
||||
throws IOException {
|
||||
setupStartSpringIo();
|
||||
properties.getGit().setOauthToken("");
|
||||
CustomGithubIssues issues = new SpringCloudGithubIssues(github, properties);
|
||||
|
||||
thenThrownBy(() -> issues.fileIssueInStartSpringIo(
|
||||
new Projects(Collections.singletonList(
|
||||
new ProjectVersion("spring-cloud-build", "2.0.0.RELEASE"))),
|
||||
nonGaSleuthProject())).isInstanceOf(IllegalArgumentException.class)
|
||||
.hasMessageContaining(
|
||||
"You have to pass Github OAuth token for milestone closing to be operational");
|
||||
}
|
||||
|
||||
private Repo createGettingStartedGuides(MkGithub github) throws IOException {
|
||||
return github.repos()
|
||||
.create(new Repos.RepoCreate("getting-started-guides", false));
|
||||
}
|
||||
|
||||
private Repo createStartSpringIo(MkGithub github) throws IOException {
|
||||
return github.repos().create(new Repos.RepoCreate("start.spring.io", false));
|
||||
}
|
||||
|
||||
private ProjectVersion nonGaSleuthProject() {
|
||||
return new ProjectVersion("spring-cloud-sleuth", "0.2.0.BUILD-SNAPSHOT");
|
||||
}
|
||||
|
||||
ReleaserProperties withToken() {
|
||||
ReleaserProperties properties = SpringCloudReleaserProperties.get();
|
||||
properties.getGit().setOauthToken("foo");
|
||||
properties.getPom().setBranch("vEdgware.RELEASE");
|
||||
properties.getGit().setUpdateSpringGuides(true);
|
||||
properties.getGit().setUpdateStartSpringIo(true);
|
||||
return properties;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.spring;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Before;
|
||||
import releaser.internal.buildsystem.TestUtils;
|
||||
import releaser.internal.spring.AbstractSpringAcceptanceTests;
|
||||
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
public class AbstractSpringCloudAcceptanceTests extends AbstractSpringAcceptanceTests {
|
||||
|
||||
public File springCloudConsulProject;
|
||||
|
||||
public File springCloudBuildProject;
|
||||
|
||||
@Before
|
||||
public void setupCloud() throws Exception {
|
||||
this.temporaryFolder = this.tmp.newFolder();
|
||||
this.springCloudConsulProject = new File(AbstractSpringAcceptanceTests.class
|
||||
.getResource("/projects/spring-cloud-consul").toURI());
|
||||
this.springCloudBuildProject = new File(AbstractSpringAcceptanceTests.class
|
||||
.getResource("/projects/spring-cloud-build").toURI());
|
||||
TestUtils.prepareLocalRepo();
|
||||
FileSystemUtils.copyRecursively(file("/projects/"), this.temporaryFolder);
|
||||
}
|
||||
|
||||
public void consulPomParentVersionIsEqualTo(File project, String expected) {
|
||||
pomParentVersionIsEqualTo(project, "spring-cloud-starter-consul", expected);
|
||||
}
|
||||
|
||||
public void thenAllDryRunStepsWereExecutedForEachProject(
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler) {
|
||||
nonAssertingTestProjectGitHandler.clonedProjects.stream()
|
||||
.filter(f -> !f.getName().contains("angel")
|
||||
&& !f.getName().equals("spring-cloud"))
|
||||
.forEach(project -> {
|
||||
then(Arrays.asList("spring-cloud-starter-build",
|
||||
"spring-cloud-consul"))
|
||||
.contains(pom(project).getArtifactId());
|
||||
then(new File("/tmp/executed_build")).exists();
|
||||
then(new File("/tmp/executed_deploy")).doesNotExist();
|
||||
then(new File("/tmp/executed_docs")).doesNotExist();
|
||||
});
|
||||
}
|
||||
|
||||
public void assertThatClonedConsulProjectIsInSnapshots(File origin) {
|
||||
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
|
||||
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.spring.meta;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.junit.Before;
|
||||
import releaser.internal.spring.meta.AbstractSpringMetaReleaseAcceptanceTests;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
|
||||
public class AbstractSpringCloudMetaAcceptanceTests
|
||||
extends AbstractSpringMetaReleaseAcceptanceTests {
|
||||
|
||||
public File springCloudConsulProject;
|
||||
|
||||
public File springCloudBuildProject;
|
||||
|
||||
@Before
|
||||
public void setupCloud() throws Exception {
|
||||
this.springCloudConsulProject = new File(
|
||||
AbstractSpringCloudMetaAcceptanceTests.class
|
||||
.getResource("/projects/spring-cloud-consul").toURI());
|
||||
this.springCloudBuildProject = new File(
|
||||
AbstractSpringCloudMetaAcceptanceTests.class
|
||||
.getResource("/projects/spring-cloud-build").toURI());
|
||||
}
|
||||
|
||||
public void consulPomParentVersionIsEqualTo(File project, String expected) {
|
||||
pomParentVersionIsEqualTo(project, "spring-cloud-starter-consul", expected);
|
||||
}
|
||||
|
||||
public void thenAllDryRunStepsWereExecutedForEachProject(
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler) {
|
||||
nonAssertingTestProjectGitHandler.clonedProjects.stream()
|
||||
.filter(f -> !f.getName().contains("angel")
|
||||
&& !f.getName().equals("spring-cloud"))
|
||||
.forEach(project -> {
|
||||
then(Arrays.asList("spring-cloud-starter-build",
|
||||
"spring-cloud-consul"))
|
||||
.contains(pom(project).getArtifactId());
|
||||
then(new File("/tmp/executed_build")).exists();
|
||||
then(new File("/tmp/executed_deploy")).doesNotExist();
|
||||
then(new File("/tmp/executed_docs")).doesNotExist();
|
||||
});
|
||||
}
|
||||
|
||||
public void assertThatClonedConsulProjectIsInSnapshots(File origin) {
|
||||
pomVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
|
||||
consulPomParentVersionIsEqualTo(origin, "1.2.0.BUILD-SNAPSHOT");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.spring.meta;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.mockito.BDDMockito;
|
||||
import releaser.internal.Releaser;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.docs.CustomProjectDocumentationUpdater;
|
||||
import releaser.internal.docs.DocumentationUpdater;
|
||||
import releaser.internal.git.GitTestUtils;
|
||||
import releaser.internal.git.ProjectGitHandler;
|
||||
import releaser.internal.options.OptionsBuilder;
|
||||
import releaser.internal.postrelease.PostReleaseActions;
|
||||
import releaser.internal.project.Projects;
|
||||
import releaser.internal.sagan.SaganClient;
|
||||
import releaser.internal.sagan.SaganUpdater;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.spring.SpringReleaser;
|
||||
import releaser.internal.tasks.release.BuildProjectReleaseTask;
|
||||
import releaser.internal.template.TemplateGenerator;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
import static org.mockito.ArgumentMatchers.argThat;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringMetaReleaseAcceptanceTests
|
||||
extends AbstractSpringCloudMetaAcceptanceTests {
|
||||
|
||||
SpringApplicationBuilder runner = new SpringApplicationBuilder(
|
||||
SpringMetaReleaseAcceptanceTests.MetaReleaseConfig.class,
|
||||
SpringMetaReleaseAcceptanceTests.MetaReleaseScanningConfiguration.class)
|
||||
.web(WebApplicationType.NONE).properties("spring.jmx.enabled=false");
|
||||
|
||||
@Test
|
||||
public void should_perform_a_meta_release_of_sc_release_and_consul()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties("test.metarelease=true")
|
||||
.properties(metaReleaseArgs(project).bomBranch("vGreenwich.SR2")
|
||||
.addFixedVersions(edgwareSr10()).build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context
|
||||
.getBean(NonAssertingTestProjectGitHandler.class);
|
||||
SaganUpdater saganUpdater = context.getBean(SaganUpdater.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
PostReleaseActions postReleaseActions = context
|
||||
.getBean(PostReleaseActions.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().metaRelease(true).options());
|
||||
|
||||
then(result.isFailureOrUnstable()).isFalse();
|
||||
// consul, release, documentation
|
||||
then(nonAssertingTestProjectGitHandler.clonedProjects).hasSize(3);
|
||||
// don't want to verify the docs
|
||||
thenAllStepsWereExecutedForEachProject(
|
||||
nonAssertingTestProjectGitHandler);
|
||||
thenSaganWasCalled(saganUpdater);
|
||||
thenDocumentationWasUpdated(testDocumentationUpdater);
|
||||
then(clonedProject(nonAssertingTestProjectGitHandler,
|
||||
"spring-cloud-consul").tagList().call()).extracting("name")
|
||||
.contains("refs/tags/v5.3.5.RELEASE");
|
||||
thenRunUpdatedTestsWereCalled(postReleaseActions);
|
||||
thenUpdateReleaseTrainDocsWasCalled(postReleaseActions);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_perform_a_meta_release_of_sc_release_and_consul_in_parallel()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner, properties("debug=true").properties("test.metarelease=true")
|
||||
.properties(metaReleaseArgsForParallel(project)
|
||||
.bomBranch("vGreenwich.SR2").addFixedVersions(edgwareSr10())
|
||||
.metaReleaseGroups("example1,example2",
|
||||
"spring-cloud-build,spring-cloud-consul,spring-cloud-release")
|
||||
.build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context
|
||||
.getBean(NonAssertingTestProjectGitHandler.class);
|
||||
SaganUpdater saganUpdater = context.getBean(SaganUpdater.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
PostReleaseActions postReleaseActions = context
|
||||
.getBean(PostReleaseActions.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().metaRelease(true).options());
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
|
||||
then(result.isFailureOrUnstable()).isFalse();
|
||||
// TODO: Assert the steps
|
||||
// build, consul, release, documentation
|
||||
// then(nonAssertingTestProjectGitHandler.clonedProjects).hasSize(4);
|
||||
// don't want to verify the docs
|
||||
// thenAllStepsWereExecutedForEachProject(
|
||||
// nonAssertingTestProjectGitHandler);
|
||||
thenSaganWasCalled(saganUpdater);
|
||||
thenDocumentationWasUpdated(testDocumentationUpdater);
|
||||
then(clonedProject(nonAssertingTestProjectGitHandler,
|
||||
"spring-cloud-consul").tagList().call()).extracting("name")
|
||||
.contains("refs/tags/v5.3.5.RELEASE");
|
||||
thenRunUpdatedTestsWereCalled(postReleaseActions);
|
||||
thenUpdateReleaseTrainDocsWasCalled(postReleaseActions);
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_perform_a_meta_release_dry_run_of_sc_release_and_consul()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties("test.metarelease=true")
|
||||
.properties(metaReleaseArgs(project).bomBranch("vGreenwich.SR2")
|
||||
.addFixedVersions(edgwareSr10()).build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler = context
|
||||
.getBean(NonAssertingTestProjectGitHandler.class);
|
||||
SaganUpdater saganUpdater = context.getBean(SaganUpdater.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
PostReleaseActions postReleaseActions = context
|
||||
.getBean(PostReleaseActions.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser.release(new OptionsBuilder()
|
||||
.metaRelease(true).dryRun(true).options());
|
||||
|
||||
then(result.isFailureOrUnstable()).isFalse();
|
||||
// consul, release
|
||||
then(nonAssertingTestProjectGitHandler.clonedProjects).hasSize(2);
|
||||
// only dry run tasks were called
|
||||
thenAllDryRunStepsWereExecutedForEachProject(
|
||||
nonAssertingTestProjectGitHandler);
|
||||
thenSaganWasNotCalled(saganUpdater);
|
||||
thenDocumentationWasNotUpdated(testDocumentationUpdater);
|
||||
then(clonedProject(nonAssertingTestProjectGitHandler,
|
||||
"spring-cloud-consul").tagList().call()).extracting("name")
|
||||
.doesNotContain("refs/tags/v5.3.5.RELEASE");
|
||||
thenRunUpdatedTestsWereNotCalled(postReleaseActions);
|
||||
thenUpdateReleaseTrainDocsWasNotCalled(postReleaseActions);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_release_any_projects_when_they_are_on_list_of_projects_to_skip()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
File temporaryDestination = this.tmp.newFolder();
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true")
|
||||
.properties("test.metarelease=true", "test.mockBuild=true")
|
||||
.properties(metaReleaseArgs(project).bomBranch("Greenwich")
|
||||
.addFixedVersions(consulAndReleaseSnapshots())
|
||||
.updateReleaseTrainWiki(false)
|
||||
.cloneDestinationDirectory(temporaryDestination)
|
||||
.projectsToSkip("spring-cloud-consul").build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
BuildProjectReleaseTask build = context
|
||||
.getBean(BuildProjectReleaseTask.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().metaRelease(true).options());
|
||||
|
||||
then(result.isFailureOrUnstable()).isFalse();
|
||||
thenBuildWasNeverCalledFor(build, "spring-cloud-consul");
|
||||
thenBuildWasCalledFor(build, "spring-cloud-release");
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_perform_a_meta_release_of_consul_only_when_run_from_got_passed()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
File temporaryDestination = this.tmp.newFolder();
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true")
|
||||
.properties("test.metarelease=true", "test.mockBuild=true")
|
||||
.properties(metaReleaseArgs(project).bomBranch("Greenwich")
|
||||
.addFixedVersions(releaseConsulBuildSnapshots())
|
||||
.cloneDestinationDirectory(temporaryDestination).build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
BuildProjectReleaseTask build = context
|
||||
.getBean(BuildProjectReleaseTask.class);
|
||||
SaganUpdater saganUpdater = context.getBean(SaganUpdater.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().startFrom("spring-cloud-consul")
|
||||
.metaRelease(true).options());
|
||||
|
||||
// release
|
||||
then(result.isFailureOrUnstable()).isFalse();
|
||||
thenBuildWasNeverCalledFor(build, "spring-cloud-build");
|
||||
thenBuildWasCalledFor(build, "spring-cloud-consul");
|
||||
thenBuildWasCalledFor(build, "spring-cloud-release");
|
||||
|
||||
// post release
|
||||
thenSaganWasCalled(saganUpdater);
|
||||
thenDocumentationWasUpdated(testDocumentationUpdater);
|
||||
thenWikiPageWasUpdated(testDocumentationUpdater);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_perform_a_meta_release_of_consul_only_when_task_names_got_passed()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
File temporaryDestination = this.tmp.newFolder();
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true")
|
||||
.properties("test.metarelease=true", "test.mockBuild=true")
|
||||
.properties(metaReleaseArgs(project).bomBranch("Greenwich")
|
||||
.addFixedVersions(releaseConsulBuildSnapshots())
|
||||
.cloneDestinationDirectory(temporaryDestination).build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
BuildProjectReleaseTask build = context
|
||||
.getBean(BuildProjectReleaseTask.class);
|
||||
SaganUpdater saganUpdater = context.getBean(SaganUpdater.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser.release(new OptionsBuilder()
|
||||
.taskNames(Collections.singletonList("spring-cloud-consul"))
|
||||
.metaRelease(true).options());
|
||||
|
||||
// release
|
||||
then(result.isFailureOrUnstable()).isFalse();
|
||||
thenBuildWasNeverCalledFor(build, "spring-cloud-release");
|
||||
thenBuildWasNeverCalledFor(build, "spring-cloud-build");
|
||||
thenBuildWasCalledFor(build, "spring-cloud-consul");
|
||||
|
||||
// post release
|
||||
thenSaganWasCalled(saganUpdater);
|
||||
thenDocumentationWasUpdated(testDocumentationUpdater);
|
||||
thenWikiPageWasUpdated(testDocumentationUpdater);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
private void thenWikiPageWasUpdated(DocumentationUpdater documentationUpdater) {
|
||||
BDDMockito.then(documentationUpdater).should()
|
||||
.updateReleaseTrainWiki(BDDMockito.any(Projects.class));
|
||||
}
|
||||
|
||||
private void thenBuildWasCalledFor(BuildProjectReleaseTask build,
|
||||
String projectName) {
|
||||
BDDMockito.then(build).should().apply(argThat(
|
||||
argument -> argument.originalVersion.projectName.equals(projectName)
|
||||
|| argument.project.getAbsolutePath().endsWith(projectName)));
|
||||
}
|
||||
|
||||
private void thenBuildWasNeverCalledFor(BuildProjectReleaseTask build,
|
||||
String projectName) {
|
||||
BDDMockito.then(build).should(BDDMockito.never()).apply(argThat(
|
||||
argument -> argument.originalVersion.projectName.equals(projectName)
|
||||
|| argument.project.getAbsolutePath().endsWith(projectName)));
|
||||
}
|
||||
|
||||
private Map<String, String> consulAndReleaseSnapshots() {
|
||||
Map<String, String> versions = new LinkedHashMap<>();
|
||||
versions.put("spring-cloud-consul", "1.1.2.BUILD-SNAPSHOT");
|
||||
versions.put("spring-cloud-release", "Camden.BUILD-SNAPSHOT");
|
||||
return versions;
|
||||
}
|
||||
|
||||
private Map<String, String> releaseConsulBuildSnapshots() {
|
||||
Map<String, String> versions = new LinkedHashMap<>();
|
||||
versions.put("spring-cloud-release", "Camden.BUILD-SNAPSHOT");
|
||||
versions.put("spring-cloud-build", "1.1.2.BUILD-SNAPSHOT");
|
||||
versions.put("spring-cloud-consul", "1.1.2.BUILD-SNAPSHOT");
|
||||
return versions;
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "test.metarelease", havingValue = "true")
|
||||
@EnableAutoConfiguration
|
||||
static class MetaReleaseConfig extends DefaultTestConfiguration {
|
||||
|
||||
@Bean
|
||||
SaganClient testSaganClient() {
|
||||
SaganClient saganClient = BDDMockito.mock(SaganClient.class);
|
||||
BDDMockito.given(saganClient.getProject(anyString()))
|
||||
.willReturn(newProject());
|
||||
return saganClient;
|
||||
}
|
||||
|
||||
@Bean
|
||||
@ConditionalOnProperty(value = "test.mockBuild", havingValue = "true")
|
||||
BuildProjectReleaseTask mockedBuildProjectReleaseTask(Releaser releaser) {
|
||||
return BDDMockito.spy(new BuildProjectReleaseTask(releaser));
|
||||
}
|
||||
|
||||
@Bean
|
||||
SaganUpdater testSaganUpdater(SaganClient saganClient,
|
||||
ReleaserProperties properties) {
|
||||
return BDDMockito.spy(new SaganUpdater(saganClient, properties));
|
||||
}
|
||||
|
||||
@Bean
|
||||
PostReleaseActions myPostReleaseActions() {
|
||||
return BDDMockito.mock(PostReleaseActions.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
NonAssertingTestProjectGitHubHandler testProjectGitHubHandler(
|
||||
ReleaserProperties releaserProperties) {
|
||||
return new NonAssertingTestProjectGitHubHandler(releaserProperties);
|
||||
}
|
||||
|
||||
@Bean
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler(
|
||||
ReleaserProperties releaserProperties,
|
||||
@Value("${test.projectName}") String projectName) {
|
||||
return new NonAssertingTestProjectGitHandler(releaserProperties,
|
||||
file -> FileSystemUtils
|
||||
.deleteRecursively(new File(file, projectName)));
|
||||
}
|
||||
|
||||
@Bean
|
||||
TestDocumentationUpdater testDocumentationUpdater(
|
||||
ProjectGitHandler projectGitHandler,
|
||||
ReleaserProperties releaserProperties,
|
||||
TemplateGenerator templateGenerator, @Autowired(
|
||||
required = false) List<CustomProjectDocumentationUpdater> updaters) {
|
||||
return BDDMockito.spy(new TestDocumentationUpdater(projectGitHandler,
|
||||
releaserProperties, templateGenerator, updaters));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "test.metarelease", havingValue = "true",
|
||||
matchIfMissing = true)
|
||||
@ComponentScan({ "releaser.internal", "releaser.cloud" })
|
||||
static class MetaReleaseScanningConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,419 @@
|
||||
/*
|
||||
* Copyright 2013-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package releaser.cloud.spring.single;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Collections;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import org.assertj.core.api.BDDAssertions;
|
||||
import org.eclipse.jgit.revwalk.RevCommit;
|
||||
import org.junit.Test;
|
||||
import org.mockito.BDDMockito;
|
||||
import releaser.cloud.spring.AbstractSpringCloudAcceptanceTests;
|
||||
import releaser.internal.ReleaserProperties;
|
||||
import releaser.internal.docs.CustomProjectDocumentationUpdater;
|
||||
import releaser.internal.git.GitTestUtils;
|
||||
import releaser.internal.git.ProjectGitHandler;
|
||||
import releaser.internal.github.ProjectGitHubHandler;
|
||||
import releaser.internal.options.OptionsBuilder;
|
||||
import releaser.internal.postrelease.PostReleaseActions;
|
||||
import releaser.internal.project.ProjectVersion;
|
||||
import releaser.internal.project.Projects;
|
||||
import releaser.internal.sagan.SaganClient;
|
||||
import releaser.internal.spring.ArgsBuilder;
|
||||
import releaser.internal.spring.ExecutionResult;
|
||||
import releaser.internal.spring.SpringReleaser;
|
||||
import releaser.internal.template.TemplateGenerator;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.WebApplicationType;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.util.FileSystemUtils;
|
||||
|
||||
import static org.assertj.core.api.BDDAssertions.then;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
|
||||
/**
|
||||
* @author Marcin Grzejszczak
|
||||
*/
|
||||
public class SpringSingleProjectAcceptanceTests
|
||||
extends AbstractSpringCloudAcceptanceTests {
|
||||
|
||||
SpringApplicationBuilder runner = new SpringApplicationBuilder(
|
||||
SpringSingleProjectAcceptanceTests.SingleProjectReleaseConfig.class,
|
||||
SpringSingleProjectAcceptanceTests.SingleProjectScanningConfiguration.class)
|
||||
.web(WebApplicationType.NONE).properties("spring.jmx.enabled=false");
|
||||
|
||||
@Test
|
||||
public void should_fail_to_perform_a_release_of_consul_when_sc_release_contains_snapshots()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release-with-snapshot/",
|
||||
"vCamden.SR5.BROKEN");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties(new ArgsBuilder(project, this.tmp)
|
||||
.releaseTrainUrl("/projects/spring-cloud-release-with-snapshot/")
|
||||
.bomBranch("vCamden.SR5.BROKEN").expectedVersion("1.1.2.RELEASE")
|
||||
.build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
BDDAssertions.thenThrownBy(releaser::release).hasMessageContaining(
|
||||
"there is at least one SNAPSHOT library version in the Spring Cloud Release project");
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_perform_a_release_of_consul() throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "Greenwich");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties(new ArgsBuilder(project, this.tmp)
|
||||
.releaseTrainUrl("/projects/spring-cloud-release/")
|
||||
.bomBranch("vGreenwich.SR2").expectedVersion("2.1.2.RELEASE")
|
||||
.build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
TestProjectGitHubHandler gitHubHandler = context
|
||||
.getBean(TestProjectGitHubHandler.class);
|
||||
SaganClient saganClient = context.getBean(SaganClient.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
PostReleaseActions postReleaseActions = context
|
||||
.getBean(PostReleaseActions.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().interactive(true).options());
|
||||
|
||||
Iterable<RevCommit> commits = listOfCommits(project);
|
||||
Iterator<RevCommit> iterator = commits.iterator();
|
||||
tagIsPresentInOrigin(origin, "v2.1.2.RELEASE");
|
||||
commitIsPresent(iterator,
|
||||
"Bumping versions to 2.1.3.BUILD-SNAPSHOT after release");
|
||||
commitIsPresent(iterator, "Going back to snapshots");
|
||||
commitIsPresent(iterator, "Update SNAPSHOT to 2.1.2.RELEASE");
|
||||
pomVersionIsEqualTo(project, "2.1.3.BUILD-SNAPSHOT");
|
||||
consulPomParentVersionIsEqualTo(project, "2.1.3.BUILD-SNAPSHOT");
|
||||
then(gitHubHandler.closedMilestones).isTrue();
|
||||
then(emailTemplate()).doesNotExist();
|
||||
then(blogTemplate()).doesNotExist();
|
||||
then(tweetTemplate()).doesNotExist();
|
||||
then(releaseNotesTemplate()).doesNotExist();
|
||||
// once for updating GA
|
||||
// second time to update SNAPSHOT
|
||||
BDDMockito.then(saganClient).should(BDDMockito.times(2))
|
||||
.updateRelease(BDDMockito.eq("spring-cloud-consul"),
|
||||
BDDMockito.anyList());
|
||||
BDDMockito.then(saganClient).should()
|
||||
.deleteRelease("spring-cloud-consul", "2.1.2.BUILD-SNAPSHOT");
|
||||
then(gitHubHandler.issueCreatedInSpringGuides).isFalse();
|
||||
then(gitHubHandler.issueCreatedInStartSpringIo).isFalse();
|
||||
then(Files.readSymbolicLink(
|
||||
new File(testDocumentationUpdater.getDocumentationRepo(),
|
||||
"spring-cloud-consul/current").toPath())
|
||||
.toString()).isEqualTo("2.1.2.RELEASE");
|
||||
thenRunUpdatedTestsWereNotCalled(postReleaseActions);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
// issue #74
|
||||
@Test
|
||||
public void should_perform_a_release_of_sc_build() throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "vGreenwich.SR2");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudBuildProject);
|
||||
assertThatClonedBuildProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-build"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties(new ArgsBuilder(project, this.tmp)
|
||||
.releaseTrainUrl("/projects/spring-cloud-release/")
|
||||
.bomBranch("vGreenwich.SR2").projectName("spring-cloud-build")
|
||||
.expectedVersion("2.1.6.RELEASE").build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
TestProjectGitHubHandler gitHubHandler = context
|
||||
.getBean(TestProjectGitHubHandler.class);
|
||||
SaganClient saganClient = context.getBean(SaganClient.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
PostReleaseActions postReleaseActions = context
|
||||
.getBean(PostReleaseActions.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().interactive(true).options());
|
||||
|
||||
Iterable<RevCommit> commits = listOfCommits(project);
|
||||
Iterator<RevCommit> iterator = commits.iterator();
|
||||
tagIsPresentInOrigin(origin, "v2.1.6.RELEASE");
|
||||
// we're running against camden sc-release
|
||||
commitIsPresent(iterator,
|
||||
"Bumping versions to 2.1.7.BUILD-SNAPSHOT after release");
|
||||
commitIsPresent(iterator, "Going back to snapshots");
|
||||
commitIsPresent(iterator, "Update SNAPSHOT to 2.1.6.RELEASE");
|
||||
pomVersionIsEqualTo(project, "2.1.7.BUILD-SNAPSHOT");
|
||||
pomParentVersionIsEqualTo(project, "spring-cloud-build-dependencies",
|
||||
"2.1.6.RELEASE");
|
||||
then(gitHubHandler.closedMilestones).isTrue();
|
||||
then(emailTemplate()).doesNotExist();
|
||||
then(blogTemplate()).doesNotExist();
|
||||
then(tweetTemplate()).doesNotExist();
|
||||
then(releaseNotesTemplate()).doesNotExist();
|
||||
// once for updating GA
|
||||
// second time to update SNAPSHOT
|
||||
BDDMockito.then(saganClient).should(BDDMockito.times(2))
|
||||
.updateRelease(BDDMockito.eq("spring-cloud-build"),
|
||||
BDDMockito.anyList());
|
||||
BDDMockito.then(saganClient).should()
|
||||
.deleteRelease("spring-cloud-build", "2.1.6.BUILD-SNAPSHOT");
|
||||
then(gitHubHandler.issueCreatedInSpringGuides).isFalse();
|
||||
then(gitHubHandler.issueCreatedInStartSpringIo).isFalse();
|
||||
then(Files.readSymbolicLink(
|
||||
new File(testDocumentationUpdater.getDocumentationRepo(),
|
||||
"spring-cloud-build/current").toPath())
|
||||
.toString()).isEqualTo("2.1.6.RELEASE");
|
||||
thenRunUpdatedTestsWereNotCalled(postReleaseActions);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_perform_a_release_of_consul_rc1() throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "vDalston.RC1");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties(new ArgsBuilder(project, this.tmp)
|
||||
.releaseTrainUrl("/projects/spring-cloud-release/")
|
||||
.bomBranch("vDalston.RC1").expectedVersion("1.2.0.RC1").build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
TestProjectGitHubHandler gitHubHandler = context
|
||||
.getBean(TestProjectGitHubHandler.class);
|
||||
SaganClient saganClient = context.getBean(SaganClient.class);
|
||||
TestDocumentationUpdater testDocumentationUpdater = context
|
||||
.getBean(TestDocumentationUpdater.class);
|
||||
PostReleaseActions postReleaseActions = context
|
||||
.getBean(PostReleaseActions.class);
|
||||
TestExecutionResultHandler testExecutionResultHandler = context
|
||||
.getBean(TestExecutionResultHandler.class);
|
||||
|
||||
ExecutionResult result = releaser
|
||||
.release(new OptionsBuilder().interactive(true).options());
|
||||
|
||||
Iterable<RevCommit> commits = listOfCommits(project);
|
||||
tagIsPresentInOrigin(origin, "v1.2.0.RC1");
|
||||
commitIsNotPresent(commits,
|
||||
"Bumping versions to 1.2.1.BUILD-SNAPSHOT after release");
|
||||
Iterator<RevCommit> iterator = listOfCommits(project).iterator();
|
||||
commitIsPresent(iterator, "Going back to snapshots");
|
||||
commitIsPresent(iterator, "Update SNAPSHOT to 1.2.0.RC1");
|
||||
pomVersionIsEqualTo(project, "1.2.0.BUILD-SNAPSHOT");
|
||||
consulPomParentVersionIsEqualTo(project, "1.2.0.BUILD-SNAPSHOT");
|
||||
then(gitHubHandler.closedMilestones).isTrue();
|
||||
then(emailTemplate()).doesNotExist();
|
||||
then(blogTemplate()).doesNotExist();
|
||||
then(tweetTemplate()).doesNotExist();
|
||||
then(releaseNotesTemplate()).doesNotExist();
|
||||
BDDMockito.then(saganClient).should().updateRelease(
|
||||
BDDMockito.eq("spring-cloud-consul"), BDDMockito.anyList());
|
||||
BDDMockito.then(saganClient).should()
|
||||
.deleteRelease("spring-cloud-consul", "1.2.0.M8");
|
||||
BDDMockito.then(saganClient).should()
|
||||
.deleteRelease("spring-cloud-consul", "1.2.0.RC1");
|
||||
// we update guides only for SR / RELEASE
|
||||
then(gitHubHandler.issueCreatedInSpringGuides).isFalse();
|
||||
then(gitHubHandler.issueCreatedInStartSpringIo).isFalse();
|
||||
// haven't even checked out the branch
|
||||
then(new File(testDocumentationUpdater.getDocumentationRepo(),
|
||||
"current/index.html")).doesNotExist();
|
||||
thenRunUpdatedTestsWereNotCalled(postReleaseActions);
|
||||
|
||||
// print results
|
||||
testExecutionResultHandler.accept(result);
|
||||
then(testExecutionResultHandler.exitedSuccessOrUnstable).isTrue();
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_not_clone_when_option_not_to_clone_was_switched_on()
|
||||
throws Exception {
|
||||
checkoutReleaseTrainBranch("/projects/spring-cloud-release/", "master");
|
||||
File origin = cloneToTemporaryDirectory(this.springCloudConsulProject);
|
||||
assertThatClonedConsulProjectIsInSnapshots(origin);
|
||||
File project = cloneToTemporaryDirectory(tmpFile("spring-cloud-consul"));
|
||||
GitTestUtils.setOriginOnProjectToTmp(origin, project);
|
||||
final File temporaryDestination = this.tmp.newFolder();
|
||||
|
||||
run(this.runner,
|
||||
properties("debug=true").properties(new ArgsBuilder(project, this.tmp)
|
||||
.releaseTrainUrl("/projects/spring-cloud-release/")
|
||||
.bomBranch("vCamden.SR5").expectedVersion("1.1.2.RELEASE")
|
||||
// just build
|
||||
.chosenOption("6").fetchVersionsFromGit(false)
|
||||
.cloneDestinationDirectory(temporaryDestination)
|
||||
.addFixedVersion("spring-cloud-release", "Finchley.RELEASE")
|
||||
.addFixedVersion("spring-cloud-consul", "2.3.4.RELEASE").build()),
|
||||
context -> {
|
||||
SpringReleaser releaser = context.getBean(SpringReleaser.class);
|
||||
|
||||
releaser.release(new OptionsBuilder().interactive(true).options());
|
||||
|
||||
then(temporaryDestination.list()).isEmpty();
|
||||
});
|
||||
}
|
||||
|
||||
private void assertThatClonedBuildProjectIsInSnapshots(File origin) {
|
||||
pomVersionIsEqualTo(origin, "1.3.7.BUILD-SNAPSHOT");
|
||||
pomParentVersionIsEqualTo(origin, "spring-cloud-build-dependencies",
|
||||
"1.5.9.RELEASE");
|
||||
}
|
||||
// @formatter:on
|
||||
|
||||
static class TestProjectGitHubHandler extends ProjectGitHubHandler {
|
||||
|
||||
final String expectedVersion;
|
||||
|
||||
final String projectName;
|
||||
|
||||
boolean closedMilestones = false;
|
||||
|
||||
boolean issueCreatedInSpringGuides = false;
|
||||
|
||||
boolean issueCreatedInStartSpringIo = false;
|
||||
|
||||
TestProjectGitHubHandler(ReleaserProperties properties, String expectedVersion,
|
||||
String projectName) {
|
||||
super(properties, Collections.emptyList());
|
||||
this.expectedVersion = expectedVersion;
|
||||
this.projectName = projectName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeMilestone(ProjectVersion releaseVersion) {
|
||||
then(releaseVersion.projectName).isEqualTo(this.projectName);
|
||||
then(releaseVersion.version).isEqualTo(this.expectedVersion);
|
||||
this.closedMilestones = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createIssueInSpringGuides(Projects projects, ProjectVersion version) {
|
||||
this.issueCreatedInSpringGuides = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createIssueInStartSpringIo(Projects projects,
|
||||
ProjectVersion version) {
|
||||
this.issueCreatedInStartSpringIo = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String milestoneUrl(ProjectVersion releaseVersion) {
|
||||
return "https://foo.bar.com/" + releaseVersion.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@EnableAutoConfiguration
|
||||
@ConditionalOnProperty(value = "test.metarelease", havingValue = "false",
|
||||
matchIfMissing = true)
|
||||
static class SingleProjectReleaseConfig extends DefaultTestConfiguration {
|
||||
|
||||
@Bean
|
||||
SaganClient testSaganClient() {
|
||||
SaganClient saganClient = BDDMockito.mock(SaganClient.class);
|
||||
BDDMockito.given(saganClient.getProject(anyString()))
|
||||
.willReturn(newProject());
|
||||
return saganClient;
|
||||
}
|
||||
|
||||
@Bean
|
||||
PostReleaseActions myPostReleaseActions() {
|
||||
return BDDMockito.mock(PostReleaseActions.class);
|
||||
}
|
||||
|
||||
@Bean
|
||||
TestProjectGitHubHandler testProjectGitHubHandler(
|
||||
ReleaserProperties releaserProperties,
|
||||
@Value("${test.expectedVersion}") String expectedVersion,
|
||||
@Value("${test.projectName}") String projectName) {
|
||||
return new TestProjectGitHubHandler(releaserProperties, expectedVersion,
|
||||
projectName);
|
||||
}
|
||||
|
||||
@Bean
|
||||
NonAssertingTestProjectGitHandler nonAssertingTestProjectGitHandler(
|
||||
ReleaserProperties releaserProperties,
|
||||
@Value("${test.projectName}") String projectName) {
|
||||
return new NonAssertingTestProjectGitHandler(releaserProperties,
|
||||
file -> FileSystemUtils
|
||||
.deleteRecursively(new File(file, projectName)));
|
||||
}
|
||||
|
||||
@Bean
|
||||
TestDocumentationUpdater testDocumentationUpdater(
|
||||
ProjectGitHandler projectGitHandler,
|
||||
ReleaserProperties releaserProperties,
|
||||
TemplateGenerator templateGenerator, @Autowired(
|
||||
required = false) List<CustomProjectDocumentationUpdater> updaters) {
|
||||
return new TestDocumentationUpdater(projectGitHandler, releaserProperties,
|
||||
templateGenerator, updaters);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnProperty(value = "test.metarelease", havingValue = "false",
|
||||
matchIfMissing = true)
|
||||
@ComponentScan({ "releaser.internal", "releaser.cloud" })
|
||||
static class SingleProjectScanningConfiguration {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
25
projects/spring-cloud/src/test/resources/logback.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<!--
|
||||
~ Copyright 2013-2019 the original author or authors.
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ https://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml"/>
|
||||
<logger name="releaser" level="DEBUG"/>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -0,0 +1,4 @@
|
||||
releaser.maven.buildCommand: ./scripts/noIntegration.sh
|
||||
releaser.gradle.gradlePropsSubstitution:
|
||||
verifierVersion: spring-cloud-contract
|
||||
bootVersion: spring-boot
|
||||
@@ -0,0 +1,3 @@
|
||||
releaser:
|
||||
maven:
|
||||
buildCommand: ./scripts/build.sh {{systemProps}}
|
||||
@@ -0,0 +1,6 @@
|
||||
releaser.maven.buildCommand: maven_build
|
||||
releaser.bash.buildCommand: bash_build
|
||||
releaser.gradle.buildCommand: gradle_build
|
||||
releaser.gradle.gradlePropsSubstitution:
|
||||
verifierVersion: spring-cloud-contract
|
||||
bootVersion: spring-boot
|
||||
18
projects/spring-cloud/src/test/resources/projects/spring-cloud-build/.gitignore
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
*~
|
||||
#*
|
||||
*#
|
||||
.#*
|
||||
.classpath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.gradle
|
||||
build
|
||||
bin
|
||||
target/
|
||||
asciidoctor.css
|
||||
_site/
|
||||
*.swp
|
||||
.idea
|
||||
*.iml
|
||||
.factorypath
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<settings>
|
||||
<servers>
|
||||
<server>
|
||||
<id>repo.spring.io</id>
|
||||
<username>${env.CI_DEPLOY_USERNAME}</username>
|
||||
<password>${env.CI_DEPLOY_PASSWORD}</password>
|
||||
</server>
|
||||
</servers>
|
||||
<profiles>
|
||||
<profile>
|
||||
<!--
|
||||
N.B. this profile is only here to support users and IDEs that do not use Maven 3.3.
|
||||
It isn't needed on the command line if you use the wrapper script (mvnw) or if you use
|
||||
a native Maven with the right version. Eclipse users should points their Maven tooling to
|
||||
this settings file, or copy the profile into their ~/.m2/settings.xml.
|
||||
-->
|
||||
<id>spring</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>spring-releases</id>
|
||||
<name>Spring Releases</name>
|
||||
<url>https://repo.spring.io/release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-snapshots</id>
|
||||
<name>Spring Snapshots</name>
|
||||
<url>https://repo.spring.io/libs-snapshot-local</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
<pluginRepository>
|
||||
<id>spring-milestones</id>
|
||||
<name>Spring Milestones</name>
|
||||
<url>https://repo.spring.io/libs-milestone-local</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
</settings>
|
||||
@@ -0,0 +1,26 @@
|
||||
sudo: false
|
||||
language: java
|
||||
before_install:
|
||||
- echo Using MVN_GOAL=${MVN_GOAL} for SPRING_CLOUD_BUILD=${SPRING_CLOUD_BUILD}
|
||||
- git config user.name "$GIT_NAME"
|
||||
- git config user.email "$GIT_EMAIL"
|
||||
- git config credential.helper "store --file=.git/credentials"
|
||||
- echo "https://$GH_TOKEN:@github.com" > .git/credentials
|
||||
- gem install asciidoctor
|
||||
install:
|
||||
- ./mvnw install -P docs -q -U -DskipTests=true -Dmaven.test.redirectTestOutputToFile=true
|
||||
- '[ "${MVN_GOAL}" == "deploy" ] && ./docs/src/main/asciidoc/ghpages.sh || echo "Not updating docs"'
|
||||
script:
|
||||
- './mvnw -s .settings.xml $MVN_GOAL $MVN_PROFILE -nsu -Dmaven.test.redirectTestOutputToFile=true'
|
||||
env:
|
||||
global:
|
||||
- GIT_NAME="Dave Syer"
|
||||
- GIT_EMAIL=dsyer@pivotal.io
|
||||
- CI_DEPLOY_USERNAME=buildmaster
|
||||
- FEATURE_BRANCH=$(echo ${TRAVIS_BRANCH} | grep "^.*/.*$" && echo true || echo false)
|
||||
- SPRING_CLOUD_BUILD=$(echo ${TRAVIS_REPO_SLUG} | grep -q "^spring-cloud/.*$" && echo true || echo false)
|
||||
- MVN_GOAL=$([ "${TRAVIS_PULL_REQUEST}" == "false" -a "${TRAVIS_TAG}" == "" -a "${FEATURE_BRANCH}" == "false" -a "${SPRING_CLOUD_BUILD}" == "true" ] && echo deploy || echo install)
|
||||
- VERSION=$(mvn validate | grep Building | head -1 | sed -e 's/.* //')
|
||||
- MILESTONE=$(echo ${VERSION} | egrep 'M|RC' && echo true || echo false)
|
||||
- MVN_PROFILE=$([ "${MILESTONE}" == "true" ] && echo -P milestone)
|
||||
- secure: "KRJQg6soMWudREJ11ocGK8I4OuhIehvy/ehTjBxvyATEwL6rXA9dKPGfb0OAscEgIpNxW1cezH8vUSaSZGFhx6LF5VnJ9Mh39pi9uYm9GMjQ61B4d5GaRjbGj/fXBd8kGubDO8kmjkDGGgkjWXfYZa/WIQ4kVWCIB5dVV9XJ0Lw="
|
||||
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
https://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,122 @@
|
||||
// Do not edit this file (e.g. go instead to src/main/asciidoc)
|
||||
|
||||
image:https://circleci.com/gh/spring-cloud/spring-cloud-build.svg?style=svg[link="https://travis-ci.org/spring-cloud/spring-cloud-build"]
|
||||
|
||||
Spring Cloud Build is a common utility project for Spring Cloud to use for plugin and dependency management.
|
||||
|
||||
== Building and Deploying
|
||||
|
||||
To install locally:
|
||||
|
||||
----
|
||||
|
||||
$ mvn install -s .settings.xml
|
||||
----
|
||||
|
||||
and to deploy snapshots to repo.spring.io:
|
||||
|
||||
----
|
||||
$ mvn deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local
|
||||
----
|
||||
|
||||
for a RELEASE build use
|
||||
|
||||
----
|
||||
$ mvn deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local
|
||||
----
|
||||
|
||||
and for jcenter use
|
||||
|
||||
----
|
||||
$ mvn deploy -DaltReleaseDeploymentRepository=bintray::default::https://api.bintray.com/maven/spring/jars/org.springframework.cloud:build
|
||||
----
|
||||
|
||||
and for Maven Central use
|
||||
|
||||
----
|
||||
$ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
|
||||
----
|
||||
|
||||
(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).
|
||||
|
||||
== Contributing
|
||||
|
||||
Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master.
|
||||
If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.
|
||||
|
||||
=== Sign the Contributor License Agreement
|
||||
|
||||
Before we accept a non-trivial patch or pull request we will need you to sign the
|
||||
https://cla.pivotal.io/sign/spring[Contributor License Agreement].
|
||||
Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
|
||||
Active contributors might be asked to join the core team, and given the ability to merge pull requests.
|
||||
|
||||
=== Code of Conduct
|
||||
|
||||
This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of
|
||||
conduct].
|
||||
By participating, you are expected to uphold this code.
|
||||
Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
|
||||
|
||||
=== Code Conventions and Housekeeping
|
||||
|
||||
None of these is essential for a pull request, but they will all help.
|
||||
They can also be added after the original pull request but before a merge.
|
||||
|
||||
* Use the Spring Framework code format conventions.
|
||||
If you use Eclipse you can import formatter settings using the
|
||||
`eclipse-code-formatter.xml` file from the
|
||||
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
|
||||
Cloud Build] project.
|
||||
If using IntelliJ, you can use the
|
||||
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
|
||||
Plugin] to import the same file.
|
||||
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
|
||||
`@author` tag identifying you, and preferably at least a paragraph on what the class is for.
|
||||
* Add the ASF license header comment to all new `.java` files (copy from existing files in the project)
|
||||
* Add yourself as an `@author` to the .java files that you modify substantially (more than cosmetic changes).
|
||||
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
|
||||
* A few unit tests would help a lot as well -- someone has to do it.
|
||||
* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
|
||||
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number).
|
||||
|
||||
== Reusing the documentation
|
||||
|
||||
Spring Cloud Build publishes its `spring-cloud-build-docs` module that contains helpful scripts (e.g. README generation ruby script) and css, xslt and images for the Spring Cloud documentation.
|
||||
If you want to follow the same convention approach of generating documentation just add these plugins to your `docs` module
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docs</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId> <1>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId> <2>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.agilejava.docbkx</groupId>
|
||||
<artifactId>docbkx-maven-plugin</artifactId> <3>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId> <4>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
----
|
||||
<1> This plugin downloads and unpacks the resources of the `spring-cloud-build-docs` module
|
||||
<2> This plugin is required to parse the Asciidoctor documentation
|
||||
<3> This plugin converts the Asciidoctor documentation into single and multi page docs
|
||||
<4> This plugin is required to copy resources into proper final destinations and to generate main README.adoc
|
||||
|
||||
IMPORTANT: The order of plugin declaration is important!
|
||||
@@ -0,0 +1,20 @@
|
||||
general:
|
||||
branches:
|
||||
ignore:
|
||||
- gh-pages # list of branches to ignore
|
||||
machine:
|
||||
java:
|
||||
version: openjdk8 #Open JDK has the JCE extentions installed by default
|
||||
environment:
|
||||
_JAVA_OPTIONS: "-Xms1024m -Xmx2048m"
|
||||
dependencies:
|
||||
override:
|
||||
- ./mvnw -s .settings.xml -U --fail-never dependency:go-offline || true
|
||||
test:
|
||||
override:
|
||||
- ./mvnw -s .settings.xml clean install org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
||||
post:
|
||||
- find . -type f -regex ".*/spring-cloud-*.*/target/*.*" | cpio -pdm $CIRCLE_ARTIFACTS
|
||||
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
|
||||
- find . -type f -regex ".*/target/.*-reports/.*" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
|
||||
- bash <(curl -s https://codecov.io/bash)
|
||||
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>spring-cloud-build-docs</artifactId>
|
||||
<name>spring-cloud-build-docs</name>
|
||||
<packaging>jar</packaging>
|
||||
<description>Spring Cloud Build Docs</description>
|
||||
<parent>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-build</artifactId>
|
||||
<version>1.3.7.BUILD-SNAPSHOT</version>
|
||||
</parent>
|
||||
<properties>
|
||||
<docs.main>spring-cloud-build</docs.main>
|
||||
<!-- Comma separated list of whitelisted branches -->
|
||||
<docs.whitelisted.branches>1.2.x,1.3.x</docs.whitelisted.branches>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<docs.resources.dir>${basedir}/src/main</docs.resources.dir>
|
||||
</properties>
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.2</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docs</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.agilejava.docbkx</groupId>
|
||||
<artifactId>docbkx-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
@@ -0,0 +1,83 @@
|
||||
image:https://circleci.com/gh/spring-cloud/spring-cloud-build.svg?style=svg[link="https://travis-ci.org/spring-cloud/spring-cloud-build"]
|
||||
|
||||
Spring Cloud Build is a common utility project for Spring Cloud to use for plugin and dependency management.
|
||||
|
||||
== Building and Deploying
|
||||
|
||||
To install locally:
|
||||
|
||||
----
|
||||
|
||||
$ mvn install -s .settings.xml
|
||||
----
|
||||
|
||||
and to deploy snapshots to repo.spring.io:
|
||||
|
||||
----
|
||||
$ mvn deploy -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local
|
||||
----
|
||||
|
||||
for a RELEASE build use
|
||||
|
||||
----
|
||||
$ mvn deploy -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local
|
||||
----
|
||||
|
||||
and for jcenter use
|
||||
|
||||
----
|
||||
$ mvn deploy -DaltReleaseDeploymentRepository=bintray::default::https://api.bintray.com/maven/spring/jars/org.springframework.cloud:build
|
||||
----
|
||||
|
||||
and for Maven Central use
|
||||
|
||||
----
|
||||
$ mvn deploy -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2
|
||||
----
|
||||
|
||||
(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent).
|
||||
|
||||
== Contributing
|
||||
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing.adoc[]
|
||||
|
||||
== Reusing the documentation
|
||||
|
||||
Spring Cloud Build publishes its `spring-cloud-build-docs` module that contains helpful scripts (e.g. README generation ruby script) and css, xslt and images for the Spring Cloud documentation.
|
||||
If you want to follow the same convention approach of generating documentation just add these plugins to your `docs` module
|
||||
|
||||
[source,xml]
|
||||
----
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>docs</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId> <1>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId> <2>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.agilejava.docbkx</groupId>
|
||||
<artifactId>docbkx-maven-plugin</artifactId> <3>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId> <4>
|
||||
<inherited>false</inherited>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
----
|
||||
<1> This plugin downloads and unpacks the resources of the `spring-cloud-build-docs` module
|
||||
<2> This plugin is required to parse the Asciidoctor documentation
|
||||
<3> This plugin converts the Asciidoctor documentation into single and multi page docs
|
||||
<4> This plugin is required to copy resources into proper final destinations and to generate main README.adoc
|
||||
|
||||
IMPORTANT: The order of plugin declaration is important!
|
||||
@@ -0,0 +1,72 @@
|
||||
=== Basic Compile and Test
|
||||
|
||||
To build the source you will need to install JDK {jdkversion}.
|
||||
|
||||
Spring Cloud uses Maven for most build-related activities, and you should be able to get off the ground quite quickly by cloning the project you are interested in and typing
|
||||
|
||||
----
|
||||
$ ./mvnw install
|
||||
----
|
||||
|
||||
NOTE: You can also install Maven (>=3.3.3) yourself and run the `mvn` command in place of `./mvnw` in the examples below.
|
||||
If you do that you also might need to add `-P spring` if your local Maven settings do not contain repository declarations for spring pre-release artifacts.
|
||||
|
||||
NOTE: Be aware that you might need to increase the amount of memory available to Maven by setting a `MAVEN_OPTS` environment variable with a value like `-Xmx512m -XX:MaxPermSize=128m`.
|
||||
We try to cover this in the `.mvn` configuration, so if you find you have to do it to make a build succeed, please raise a ticket to get the settings added to source control.
|
||||
|
||||
For hints on how to build the project look in `.travis.yml` if there is one.
|
||||
There should be a "script" and maybe "install" command.
|
||||
Also look at the "services" section to see if any services need to be running locally (e.g. mongo or rabbit).
|
||||
Ignore the git-related bits that you might find in "before_install" since they're related to setting git credentials and you already have those.
|
||||
|
||||
The projects that require middleware generally include a
|
||||
`docker-compose.yml`, so consider using
|
||||
https://compose.docker.io/[Docker Compose] to run the middeware servers in Docker containers.
|
||||
See the README in the
|
||||
https://github.com/spring-cloud-samples/scripts[scripts demo
|
||||
repository] for specific instructions about the common cases of mongo, rabbit and redis.
|
||||
|
||||
NOTE: If all else fails, build with the command from `.travis.yml` (usually
|
||||
`./mvnw install`).
|
||||
|
||||
=== Documentation
|
||||
|
||||
The spring-cloud-build module has a "docs" profile, and if you switch that on it will try to build asciidoc sources from
|
||||
`src/main/asciidoc`.
|
||||
As part of that process it will look for a
|
||||
`README.adoc` and process it by loading all the includes, but not parsing or rendering it, just copying it to `${main.basedir}`
|
||||
(defaults to `${basedir}`, i.e. the root of the project).
|
||||
If there are any changes in the README it will then show up after a Maven build as a modified file in the correct place.
|
||||
Just commit it and push the change.
|
||||
|
||||
=== Working with the code
|
||||
|
||||
If you don't have an IDE preference we would recommend that you use
|
||||
https://www.springsource.com/developer/sts[Spring Tools Suite] or
|
||||
https://eclipse.org[Eclipse] when working with the code.
|
||||
We use the
|
||||
https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support.
|
||||
Other IDEs and tools should also work without issue as long as they use Maven 3.3.3 or better.
|
||||
|
||||
==== Importing into eclipse with m2eclipse
|
||||
|
||||
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with eclipse.
|
||||
If you don't already have m2eclipse installed it is available from the "eclipse marketplace".
|
||||
|
||||
NOTE: Older versions of m2e do not support Maven 3.3, so once the projects are imported into Eclipse you will also need to tell m2eclipse to use the right profile for the projects.
|
||||
If you see many different errors related to the POMs in the projects, check that you have an up to date installation.
|
||||
If you can't upgrade m2e, add the "spring" profile to your `settings.xml`.
|
||||
Alternatively you can copy the repository settings from the "spring" profile of the parent pom into your `settings.xml`.
|
||||
|
||||
==== Importing into eclipse without m2eclipse
|
||||
|
||||
If you prefer not to use m2eclipse you can generate eclipse project metadata using the following command:
|
||||
|
||||
[indent=0]
|
||||
----
|
||||
$ ./mvnw eclipse:eclipse
|
||||
----
|
||||
|
||||
The generated eclipse projects can be imported by selecting `import existing projects`
|
||||
from the `file` menu.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
:jdkversion: 1.8
|
||||
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building-base.adoc[]
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
==== Adding Project Lombok Agent
|
||||
|
||||
Spring Cloud uses https://projectlombok.org/features/index.html[Project Lombok]
|
||||
to generate getters and setters etc.
|
||||
Compiling from the command line this shouldn't cause any problems, but in an IDE you need to add an agent to the JVM. Full instructions can be found in the Lombok website.
|
||||
The sign that you need to do this is a lot of compiler errors to do with missing methods and fields, e.g.
|
||||
|
||||
[indent=0]
|
||||
----
|
||||
The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 120 Java Problem
|
||||
The method getInitialStatus() is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 121 Java Problem
|
||||
The method setNonSecurePort(int) is undefined for the type EurekaInstanceConfigBean EurekaDiscoveryClientConfiguration.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 112 Java Problem
|
||||
The type EurekaInstanceConfigBean.IdentifyingDataCenterInfo must implement the inherited abstract method DataCenterInfo.getName() EurekaInstanceConfigBean.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/eureka line 131 Java Problem
|
||||
The method getId() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 60 Java Problem
|
||||
The method getLocation() is undefined for the type ProxyRouteLocator.ProxyRouteSpec PreDecorationFilter.java /spring-cloud-netflix-core/src/main/java/org/springframework/cloud/netflix/zuul/filters/pre line 55 Java Problem
|
||||
----
|
||||
|
||||
==== Importing into Intellij
|
||||
|
||||
Spring Cloud projects use annotation processing, particularly Lombok, which requires configuration or you will encounter compile problems.
|
||||
It also needs a specific version of maven and a profile enabled.
|
||||
Intellij 14.1+ requires some configuration to ensure these are setup properly.
|
||||
|
||||
1. Click Preferences, Plugins.
|
||||
*Ensure Lombok is installed*
|
||||
2. Click New, Project from Existing Sources, choose your spring-cloud project directory
|
||||
3. Choose Maven, and select Environment Settings.
|
||||
*Ensure you are using Maven 3.3.3*
|
||||
4. In the next screen, *Select the profile `spring`* click Next until Finish.
|
||||
5. Click Preferences, "Build, Execution, Deployment", Compiler, Annotation Processors.
|
||||
*Click Enable Annotation Processing*
|
||||
6. Click Build, Rebuild Project, and you are ready to go!
|
||||
|
||||
==== Importing into other IDEs
|
||||
|
||||
Maven is well supported by most Java IDEs.
|
||||
Refer to you vendor documentation.
|
||||
@@ -0,0 +1,3 @@
|
||||
:jdkversion: 1.7
|
||||
|
||||
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/building-base.adoc[]
|
||||
@@ -0,0 +1,28 @@
|
||||
= Contributor Code of Conduct
|
||||
|
||||
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
||||
|
||||
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery
|
||||
* Personal attacks
|
||||
* Trolling or insulting/derogatory comments
|
||||
* Public or private harassment
|
||||
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
|
||||
* Other unethical or unprofessional conduct
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project.
|
||||
Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting a project maintainer at spring-code-of-conduct@pivotal.io . All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.
|
||||
Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
|
||||
This Code of Conduct is adapted from the
|
||||
https://contributor-covenant.org[Contributor Covenant], version 1.3.0, available at
|
||||
https://contributor-covenant.org/version/1/3/0/[contributor-covenant.org/version/1/3/0/]
|
||||
@@ -0,0 +1,2 @@
|
||||
NOTE: Spring Cloud is released under the non-restrictive Apache 2.0 license.
|
||||
If you would like to contribute to this section of the documentation or if you find an error, please find the source code and issue trackers in the project at {docslink}[github].
|
||||
@@ -0,0 +1,38 @@
|
||||
Spring Cloud is released under the non-restrictive Apache 2.0 license, and follows a very standard Github development process, using Github tracker for issues and merging pull requests into master.
|
||||
If you want to contribute even something trivial please do not hesitate, but follow the guidelines below.
|
||||
|
||||
=== Sign the Contributor License Agreement
|
||||
|
||||
Before we accept a non-trivial patch or pull request we will need you to sign the
|
||||
https://cla.pivotal.io/sign/spring[Contributor License Agreement].
|
||||
Signing the contributor's agreement does not grant anyone commit rights to the main repository, but it does mean that we can accept your contributions, and you will get an author credit if we do.
|
||||
Active contributors might be asked to join the core team, and given the ability to merge pull requests.
|
||||
|
||||
=== Code of Conduct
|
||||
|
||||
This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of
|
||||
conduct].
|
||||
By participating, you are expected to uphold this code.
|
||||
Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.
|
||||
|
||||
=== Code Conventions and Housekeeping
|
||||
|
||||
None of these is essential for a pull request, but they will all help.
|
||||
They can also be added after the original pull request but before a merge.
|
||||
|
||||
* Use the Spring Framework code format conventions.
|
||||
If you use Eclipse you can import formatter settings using the
|
||||
`eclipse-code-formatter.xml` file from the
|
||||
https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring
|
||||
Cloud Build] project.
|
||||
If using IntelliJ, you can use the
|
||||
https://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter
|
||||
Plugin] to import the same file.
|
||||
* Make sure all new `.java` files to have a simple Javadoc class comment with at least an
|
||||
`@author` tag identifying you, and preferably at least a paragraph on what the class is for.
|
||||
* Add the ASF license header comment to all new `.java` files (copy from existing files in the project)
|
||||
* Add yourself as an `@author` to the .java files that you modify substantially (more than cosmetic changes).
|
||||
* Add some Javadocs and, if you change the namespace, some XSD doc elements.
|
||||
* A few unit tests would help a lot as well -- someone has to do it.
|
||||
* If no-one else is using your branch, please rebase it against the current master (or other target branch in the main project).
|
||||
* When writing a commit message please follow https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit message (where XXXX is the issue number).
|
||||
@@ -0,0 +1,360 @@
|
||||
#!/bin/bash -x
|
||||
|
||||
# Usage: (cd <project root>; ghpages.sh -v <version> -b -c)
|
||||
|
||||
set -e
|
||||
|
||||
# Set default props like MAVEN_PATH, ROOT_FOLDER etc.
|
||||
function set_default_props() {
|
||||
# The script should be executed from the root folder
|
||||
ROOT_FOLDER=`pwd`
|
||||
echo "Current folder is ${ROOT_FOLDER}"
|
||||
|
||||
if [[ ! -e "${ROOT_FOLDER}/.git" ]]; then
|
||||
echo "You're not in the root folder of the project!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Prop that will let commit the changes
|
||||
COMMIT_CHANGES="no"
|
||||
MAVEN_PATH=${MAVEN_PATH:-}
|
||||
if [ -e "${ROOT_FOLDER}/mvnw" ]; then
|
||||
MAVEN_EXEC="$ROOT_FOLDER/mvnw"
|
||||
else
|
||||
MAVEN_EXEC="${MAVEN_PATH}mvn"
|
||||
fi
|
||||
echo "Path to Maven is [${MAVEN_EXEC}]"
|
||||
if [ -z $REPO_NAME ]; then
|
||||
REPO_NAME=$(git remote -v | grep origin | head -1 | sed -e 's!.*/!!' -e 's/ .*//' -e 's/\.git.*//')
|
||||
fi
|
||||
echo "Repo name is [${REPO_NAME}]"
|
||||
SPRING_CLOUD_STATIC_REPO=${SPRING_CLOUD_STATIC_REPO:-git@github.com:spring-cloud/spring-cloud-static.git}
|
||||
echo "Spring Cloud Static repo is [${SPRING_CLOUD_STATIC_REPO}"
|
||||
}
|
||||
|
||||
# Check if gh-pages exists and docs have been built
|
||||
function check_if_anything_to_sync() {
|
||||
git remote set-url --push origin `git config remote.origin.url | sed -e 's/^git:/https:/'`
|
||||
|
||||
if ! (git remote set-branches --add origin gh-pages && git fetch -q) && [[ "${RELEASE_TRAIN}" != "yes" ]] ; then
|
||||
echo "No gh-pages, so not syncing"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! [ -d docs/target/generated-docs ] && ! [ "${BUILD}" == "yes" ]; then
|
||||
echo "No gh-pages sources in docs/target/generated-docs, so not syncing"
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
function retrieve_current_branch() {
|
||||
# Code getting the name of the current branch. For master we want to publish as we did until now
|
||||
# https://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch
|
||||
# If there is a branch already passed will reuse it - otherwise will try to find it
|
||||
CURRENT_BRANCH=${BRANCH}
|
||||
if [[ -z "${CURRENT_BRANCH}" ]] ; then
|
||||
CURRENT_BRANCH=$(git symbolic-ref -q HEAD)
|
||||
CURRENT_BRANCH=${CURRENT_BRANCH##refs/heads/}
|
||||
CURRENT_BRANCH=${CURRENT_BRANCH:-HEAD}
|
||||
fi
|
||||
echo "Current branch is [${CURRENT_BRANCH}]"
|
||||
git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script"
|
||||
PREVIOUS_BRANCH=${CURRENT_BRANCH}
|
||||
}
|
||||
|
||||
# Switches to the provided value of the release version. We always prefix it with `v`
|
||||
function switch_to_tag() {
|
||||
if [[ "${RELEASE_TRAIN}" != "yes" ]] ; then
|
||||
git checkout v${VERSION}
|
||||
fi
|
||||
}
|
||||
|
||||
# Build the docs if switch is on
|
||||
function build_docs_if_applicable() {
|
||||
if [[ "${BUILD}" == "yes" ]] ; then
|
||||
./mvnw clean install -P docs -pl docs -DskipTests
|
||||
fi
|
||||
}
|
||||
|
||||
# Get the name of the `docs.main` property
|
||||
# Get whitelisted branches - assumes that a `docs` module is available under `docs` profile
|
||||
function retrieve_doc_properties() {
|
||||
MAIN_ADOC_VALUE=$("${MAVEN_EXEC}" -q \
|
||||
-Dexec.executable="echo" \
|
||||
-Dexec.args='${docs.main}' \
|
||||
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \
|
||||
-P docs \
|
||||
-pl docs | tail -1 )
|
||||
echo "Extracted 'main.adoc' from Maven build [${MAIN_ADOC_VALUE}]"
|
||||
|
||||
|
||||
WHITELIST_PROPERTY=${WHITELIST_PROPERTY:-"docs.whitelisted.branches"}
|
||||
WHITELISTED_BRANCHES_VALUE=$("${MAVEN_EXEC}" -q \
|
||||
-Dexec.executable="echo" \
|
||||
-Dexec.args="\${${WHITELIST_PROPERTY}}" \
|
||||
org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \
|
||||
-P docs \
|
||||
-pl docs | tail -1 )
|
||||
echo "Extracted '${WHITELIST_PROPERTY}' from Maven build [${WHITELISTED_BRANCHES_VALUE}]"
|
||||
}
|
||||
|
||||
# Stash any outstanding changes
|
||||
function stash_changes() {
|
||||
git diff-index --quiet HEAD && dirty=$? || (echo "Failed to check if the current repo is dirty. Assuming that it is." && dirty="1")
|
||||
if [ "$dirty" != "0" ]; then git stash; fi
|
||||
}
|
||||
|
||||
# Switch to gh-pages branch to sync it with current branch
|
||||
function add_docs_from_target() {
|
||||
local DESTINATION_REPO_FOLDER
|
||||
if [[ -z "${DESTINATION}" && -z "${CLONE}" ]] ; then
|
||||
DESTINATION_REPO_FOLDER=${ROOT_FOLDER}
|
||||
elif [[ "${CLONE}" == "yes" ]]; then
|
||||
mkdir -p ${ROOT_FOLDER}/target
|
||||
local clonedStatic=${ROOT_FOLDER}/target/spring-cloud-static
|
||||
if [[ ! -e "${clonedStatic}/.git" ]]; then
|
||||
echo "Cloning Spring Cloud Static to target"
|
||||
git clone ${SPRING_CLOUD_STATIC_REPO} ${clonedStatic} && cd ${clonedStatic} && git checkout gh-pages
|
||||
else
|
||||
echo "Spring Cloud Static already cloned - will pull changes"
|
||||
cd ${clonedStatic} && git checkout gh-pages && git pull origin gh-pages
|
||||
fi
|
||||
if [[ -z "${RELEASE_TRAIN}" ]] ; then
|
||||
DESTINATION_REPO_FOLDER=${clonedStatic}/${REPO_NAME}
|
||||
else
|
||||
DESTINATION_REPO_FOLDER=${clonedStatic}
|
||||
fi
|
||||
mkdir -p ${DESTINATION_REPO_FOLDER}
|
||||
else
|
||||
if [[ ! -e "${DESTINATION}/.git" ]]; then
|
||||
echo "[${DESTINATION}] is not a git repository"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -z "${RELEASE_TRAIN}" ]] ; then
|
||||
DESTINATION_REPO_FOLDER=${DESTINATION}/${REPO_NAME}
|
||||
else
|
||||
DESTINATION_REPO_FOLDER=${DESTINATION}
|
||||
fi
|
||||
mkdir -p ${DESTINATION_REPO_FOLDER}
|
||||
echo "Destination was provided [${DESTINATION}]"
|
||||
fi
|
||||
cd ${DESTINATION_REPO_FOLDER}
|
||||
git checkout gh-pages
|
||||
git pull origin gh-pages
|
||||
|
||||
# Add git branches
|
||||
###################################################################
|
||||
if [[ -z "${VERSION}" && -z "${RELEASE_TRAIN}" ]] ; then
|
||||
copy_docs_for_current_version
|
||||
else
|
||||
copy_docs_for_provided_version
|
||||
fi
|
||||
commit_changes_if_applicable
|
||||
}
|
||||
|
||||
|
||||
# Copies the docs by using the retrieved properties from Maven build
|
||||
function copy_docs_for_current_version() {
|
||||
if [[ "${CURRENT_BRANCH}" == "master" ]] ; then
|
||||
echo -e "Current branch is master - will copy the current docs only to the root folder"
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
# Not ignored...
|
||||
cp -rf $f ${ROOT_FOLDER}/
|
||||
fi
|
||||
done
|
||||
git add -A ${ROOT_FOLDER}
|
||||
COMMIT_CHANGES="yes"
|
||||
else
|
||||
echo -e "Current branch is [${CURRENT_BRANCH}]"
|
||||
# https://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin
|
||||
if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then
|
||||
mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH}
|
||||
echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder"
|
||||
for f in docs/target/generated-docs/*; do
|
||||
file=${f#docs/target/generated-docs/*}
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then
|
||||
# Not ignored...
|
||||
# We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html
|
||||
if [[ "${file}" == "${MAIN_ADOC_VALUE}.html" ]] ; then
|
||||
# We don't want to copy the spring-cloud-sleuth.html
|
||||
# we want it to be converted to index.html
|
||||
cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
|
||||
git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html
|
||||
else
|
||||
cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}
|
||||
git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file || echo "Failed to add the file [$file]"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
COMMIT_CHANGES="yes"
|
||||
else
|
||||
echo -e "Branch [${CURRENT_BRANCH}] is not on the white list! Check out the Maven [${WHITELIST_PROPERTY}] property in
|
||||
[docs] module available under [docs] profile. Won't commit any changes to gh-pages for this branch."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Copies the docs by using the explicitly provided version
|
||||
function copy_docs_for_provided_version() {
|
||||
local FOLDER=${DESTINATION_REPO_FOLDER}/${VERSION}
|
||||
mkdir -p ${FOLDER}
|
||||
echo -e "Current tag is [v${VERSION}] Will copy the current docs to the [${FOLDER}] folder"
|
||||
for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do
|
||||
file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*}
|
||||
copy_docs_for_branch ${file} ${FOLDER}
|
||||
done
|
||||
COMMIT_CHANGES="yes"
|
||||
CURRENT_BRANCH="v${VERSION}"
|
||||
}
|
||||
|
||||
# Copies the docs from target to the provided destination
|
||||
# Params:
|
||||
# $1 - file from target
|
||||
# $2 - destination to which copy the files
|
||||
function copy_docs_for_branch() {
|
||||
local file=$1
|
||||
local destination=$2
|
||||
if ! git ls-files -i -o --exclude-standard --directory | grep -q ^${file}$; then
|
||||
# Not ignored...
|
||||
# We want users to access 1.0.0.RELEASE/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html
|
||||
if [[ ("${file}" == "${MAIN_ADOC_VALUE}.html") || ("${file}" == "${REPO_NAME}.html") ]] ; then
|
||||
# We don't want to copy the spring-cloud-sleuth.html
|
||||
# we want it to be converted to index.html
|
||||
cp -rf $f ${destination}/index.html
|
||||
else
|
||||
cp -rf $f ${destination}
|
||||
fi
|
||||
git add -A ${destination}
|
||||
fi
|
||||
}
|
||||
|
||||
function commit_changes_if_applicable() {
|
||||
if [[ "${COMMIT_CHANGES}" == "yes" ]] ; then
|
||||
COMMIT_SUCCESSFUL="no"
|
||||
git commit -a -m "Sync docs from ${CURRENT_BRANCH} to gh-pages" && COMMIT_SUCCESSFUL="yes" || echo "Failed to commit changes"
|
||||
|
||||
# Uncomment the following push if you want to auto push to
|
||||
# the gh-pages branch whenever you commit to master locally.
|
||||
# This is a little extreme. Use with care!
|
||||
###################################################################
|
||||
if [[ "${COMMIT_SUCCESSFUL}" == "yes" ]] ; then
|
||||
git push origin gh-pages
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Switch back to the previous branch and exit block
|
||||
function checkout_previous_branch() {
|
||||
# If -version was provided we need to come back to root project
|
||||
cd ${ROOT_FOLDER}
|
||||
git checkout ${PREVIOUS_BRANCH} || echo "Failed to check the branch... continuing with the script"
|
||||
if [ "$dirty" != "0" ]; then git stash pop; fi
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Assert if properties have been properly passed
|
||||
function assert_properties() {
|
||||
echo "VERSION [${VERSION}], RELEASE_TRAIN [${RELEASE_TRAIN}], DESTINATION [${DESTINATION}], CLONE [${CLONE}]"
|
||||
if [[ "${VERSION}" != "" && (-z "${DESTINATION}" && -z "${CLONE}") ]] ; then echo "Version was set but destination / clone was not!"; exit 1;fi
|
||||
if [[ ("${DESTINATION}" != "" && "${CLONE}" != "") && -z "${VERSION}" ]] ; then echo "Destination / clone was set but version was not!"; exit 1;fi
|
||||
if [[ "${DESTINATION}" != "" && "${CLONE}" == "yes" ]] ; then echo "Destination and clone was set. Pick one!"; exit 1;fi
|
||||
if [[ "${RELEASE_TRAIN}" != "" && -z "${VERSION}" ]] ; then echo "Release train was set but no version was passed!"; exit 1;fi
|
||||
}
|
||||
|
||||
# Prints the usage
|
||||
function print_usage() {
|
||||
cat <<EOF
|
||||
The idea of this script is to update gh-pages branch with the generated docs. Without any options
|
||||
the script will work in the following manner:
|
||||
|
||||
- if there's no gh-pages / target for docs module then the script ends
|
||||
- for master branch the generated docs are copied to the root of gh-pages branch
|
||||
- for any other branch (if that branch is whitelisted) a subfolder with branch name is created
|
||||
and docs are copied there
|
||||
- if the version switch is passed (-v) then a tag with (v) prefix will be retrieved and a folder
|
||||
with that version number will be created in the gh-pages branch. WARNING! No whitelist verification will take place
|
||||
- if the destination switch is passed (-d) then the script will check if the provided dir is a git repo and then will
|
||||
switch to gh-pages of that repo and copy the generated docs to `docs/<project-name>/<version>`
|
||||
- if the destination switch is passed (-d) then the script will check if the provided dir is a git repo and then will
|
||||
switch to gh-pages of that repo and copy the generated docs to `docs/<project-name>/<version>`
|
||||
- if the release train switch is passed (-r) then the script will check if the provided dir is a git repo and then will
|
||||
switch to gh-pages of that repo and copy the generated docs to `docs/<version>`
|
||||
|
||||
USAGE:
|
||||
|
||||
You can use the following options:
|
||||
|
||||
-v|--version - the script will apply the whole procedure for a particular library version
|
||||
-r|--releasetrain - instead of nesting the docs under the project_name/version folder the docs will end up in version
|
||||
-d|--destination - the root of destination folder where the docs should be copied. You have to use the full path.
|
||||
E.g. point to spring-cloud-static folder. Can't be used with (-c)
|
||||
-b|--build - will run the standard build process after checking out the branch
|
||||
-c|--clone - will automatically clone the spring-cloud-static repo instead of providing the destination.
|
||||
Obviously can't be used with (-d)
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
|
||||
# ==========================================
|
||||
# ____ ____ _____ _____ _____ _______
|
||||
# / ____|/ ____| __ \|_ _| __ \__ __|
|
||||
# | (___ | | | |__) | | | | |__) | | |
|
||||
# \___ \| | | _ / | | | ___/ | |
|
||||
# ____) | |____| | \ \ _| |_| | | |
|
||||
# |_____/ \_____|_| \_\_____|_| |_|
|
||||
#
|
||||
# ==========================================
|
||||
|
||||
while [[ $# > 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case ${key} in
|
||||
-v|--version)
|
||||
VERSION="$2"
|
||||
shift # past argument
|
||||
;;
|
||||
-r|--releasetrain)
|
||||
RELEASE_TRAIN="yes"
|
||||
;;
|
||||
-d|--destination)
|
||||
DESTINATION="$2"
|
||||
shift # past argument
|
||||
;;
|
||||
-b|--build)
|
||||
BUILD="yes"
|
||||
;;
|
||||
-c|--clone)
|
||||
CLONE="yes"
|
||||
;;
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: [$1]"
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift # past argument or value
|
||||
done
|
||||
|
||||
assert_properties
|
||||
set_default_props
|
||||
check_if_anything_to_sync
|
||||
retrieve_current_branch
|
||||
if echo $VERSION | egrep -q 'SNAPSHOT' || [[ -z "${VERSION}" ]]; then
|
||||
CLONE=""
|
||||
VERSION=""
|
||||
echo "You've provided a version variable but it's a snapshot one. Due to this will not clone spring-cloud-static and publish docs over there"
|
||||
else
|
||||
switch_to_tag
|
||||
fi
|
||||
build_docs_if_applicable
|
||||
retrieve_doc_properties
|
||||
stash_changes
|
||||
add_docs_from_target
|
||||
checkout_previous_branch
|
||||
@@ -0,0 +1,3 @@
|
||||
= Spring Cloud Build
|
||||
|
||||
include::README.adoc[]
|
||||
@@ -0,0 +1,211 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Either clones or pulls the repo for given project
|
||||
# Params:
|
||||
# $1 organization e.g. spring-cloud
|
||||
# $2 repo name e.g. spring-cloud-sleuth
|
||||
function clone_or_pull() {
|
||||
if [ "$#" -ne 2 ]
|
||||
then
|
||||
echo "You haven't provided 2 args... \$1 organization e.g. spring-cloud; \$2 repo name e.g. spring-cloud-sleuth"
|
||||
exit 1
|
||||
fi
|
||||
if [[ "${JUST_PUSH}" == "yes" ]] ; then
|
||||
echo "Skipping cloning since the option to just push was provided"
|
||||
exit 0
|
||||
fi
|
||||
local ORGANIZATION=$1
|
||||
local REPO_NAME=$2
|
||||
local LOCALREPO_VC_DIR=${REPO_NAME}/.git
|
||||
if [ ! -d ${LOCALREPO_VC_DIR} ]
|
||||
then
|
||||
echo "Repo [${REPO_NAME}] doesn't exist - will clone it!"
|
||||
git clone git@github.com:${ORGANIZATION}/${REPO_NAME}.git
|
||||
else
|
||||
echo "Repo [${REPO_NAME}] exists - will pull the changes"
|
||||
cd ${REPO_NAME} && git pull || echo "Not pulling since repo is up to date"
|
||||
cd ${ROOT_FOLDER}
|
||||
fi
|
||||
}
|
||||
|
||||
# For the given branch updates the docs/src/main/asciidoc/ghpages.sh
|
||||
# with the one from spring-cloud-build. Then commits and pushes the change
|
||||
# Params:
|
||||
# $1 repo name e.g. spring-cloud-sleuth
|
||||
# $2 branch name
|
||||
function update_ghpages_script() {
|
||||
if [ "$#" -ne 2 ]
|
||||
then
|
||||
echo "You haven't provided 2 args... \$1 repo name e.g. spring-cloud-sleuth; \$2 branch name e.g. master"
|
||||
exit 1
|
||||
fi
|
||||
local REPO_NAME=$1
|
||||
local BRANCH_NAME=$2
|
||||
echo "Updating ghpages script for [${REPO_NAME}] and branch [${BRANCH_NAME}]"
|
||||
cd ${REPO_NAME}
|
||||
echo "Checking out [${BRANCH_NAME}]"
|
||||
git checkout ${BRANCH_NAME}
|
||||
echo "Resetting the repo and pulling before commiting"
|
||||
git reset --hard origin/${BRANCH_NAME} && git pull origin ${BRANCH_NAME}
|
||||
# If the user wants to just push we will not copy / add / commit files
|
||||
if [[ "${JUST_PUSH}" != "yes" ]] ; then
|
||||
echo "Copying [${GHPAGES_DOWNLOAD_PATH}] to [${GHPAGES_IN_REPO_PATH}]"
|
||||
cp -rf ${GHPAGES_DOWNLOAD_PATH} ${GHPAGES_IN_REPO_PATH}
|
||||
echo "Adding and committing [${GHPAGES_IN_REPO_PATH}] with message [${COMMIT_MESSAGE}]"
|
||||
git add ${GHPAGES_IN_REPO_PATH}
|
||||
git commit -m "${COMMIT_MESSAGE}" || echo "Proceeding to the next repo"
|
||||
fi
|
||||
if [[ "${AUTO_PUSH}" == "yes" ]] ; then
|
||||
echo "Pushing the branch [${BRANCH_NAME}]"
|
||||
wait_if_manual_proceed
|
||||
git push origin ${BRANCH_NAME}
|
||||
fi
|
||||
cd ${ROOT_FOLDER}
|
||||
}
|
||||
|
||||
# Downloads ghpages.sh
|
||||
function download_ghpages() {
|
||||
rm -rf ${GHPAGES_DOWNLOAD_PATH}
|
||||
echo "Downloading ghpages.sh from [${GHPAGES_URL}] to [${GHPAGES_DOWNLOAD_PATH}]"
|
||||
curl ${GHPAGES_URL} -o ${GHPAGES_DOWNLOAD_PATH}
|
||||
chmod +x ${GHPAGES_DOWNLOAD_PATH}
|
||||
}
|
||||
|
||||
# Either clones or pulls the repo for given project and then updates gh-pages for the given project
|
||||
# Params:
|
||||
# $1 organization e.g. spring-cloud
|
||||
# $2 repo name e.g. spring-cloud-sleuth
|
||||
# $3 branch name e.g. master
|
||||
function clone_and_update_ghpages() {
|
||||
if [ "$#" -ne 3 ]
|
||||
then
|
||||
echo "You haven't provided 3 args... \$1 organization e.g. spring-cloud; \$2 repo name e.g. spring-cloud-sleuth; \$3 branch name e.g. master"
|
||||
exit 1
|
||||
fi
|
||||
local ORGANIZATION=$1
|
||||
local REPO_NAME=$2
|
||||
local BRANCH_NAME=$3
|
||||
local VAR
|
||||
echo -e "\n\nWill clone the repo and update scripts for org [${ORGANIZATION}], repo [${REPO_NAME}] and branch [${BRANCH_NAME}]\n\n"
|
||||
clone_or_pull ${ORGANIZATION} ${REPO_NAME}
|
||||
update_ghpages_script ${REPO_NAME} ${BRANCH_NAME}
|
||||
echo "Proceeding to next project"
|
||||
wait_if_manual_proceed
|
||||
}
|
||||
|
||||
function wait_if_manual_proceed() {
|
||||
if [[ "${AUTO_PROCEED}" != "yes" ]] ; then
|
||||
echo -n "Press [ENTER] to continue..."
|
||||
read VAR
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints the provided parameters
|
||||
function print_parameters() {
|
||||
cat <<EOF
|
||||
Running the script with the following parameters
|
||||
GHPAGES_URL=${GHPAGES_URL}
|
||||
GHPAGES_DOWNLOAD_PATH=${GHPAGES_DOWNLOAD_PATH}
|
||||
COMMIT_MESSAGE=${COMMIT_MESSAGE}
|
||||
GHPAGES_IN_REPO_PATH=${GHPAGES_IN_REPO_PATH}
|
||||
AUTO_PROCEED=${AUTO_PROCEED}
|
||||
AUTO_PUSH=${AUTO_PUSH}
|
||||
JUST_PUSH=${JUST_PUSH}
|
||||
ROOT_FOLDER=${ROOT_FOLDER}
|
||||
EOF
|
||||
}
|
||||
|
||||
# Prints the usage
|
||||
function print_usage() {
|
||||
cat <<EOF
|
||||
The idea of this script is to batch update all ghpages scripts for all projects that we have in Spring Cloud.
|
||||
If you don't provide any options by default the script will copy the latest ghpages.sh, commit it for each repo
|
||||
and then push it to the appropriate branch.
|
||||
|
||||
USAGE:
|
||||
|
||||
You can use the following options:
|
||||
|
||||
-p|--nopush - the script will not push the changes
|
||||
-m|--manualproceed - if you want to do a manual proceed after every step
|
||||
-x|--justpush - if you want to go to every single repo and just push the changes
|
||||
-h|--help - present this help message
|
||||
|
||||
EOF
|
||||
}
|
||||
|
||||
# ==========================================
|
||||
# ____ ____ _____ _____ _____ _______
|
||||
# / ____|/ ____| __ \|_ _| __ \__ __|
|
||||
# | (___ | | | |__) | | | | |__) | | |
|
||||
# \___ \| | | _ / | | | ___/ | |
|
||||
# ____) | |____| | \ \ _| |_| | | |
|
||||
# |_____/ \_____|_| \_\_____|_| |_|
|
||||
#
|
||||
# ==========================================
|
||||
|
||||
while [[ $# > 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case ${key} in
|
||||
-p|--nopush)
|
||||
AUTO_PUSH="no"
|
||||
;;
|
||||
-m|--manualproceed)
|
||||
AUTO_PROCEED="no"
|
||||
;;
|
||||
-x|--justpush)
|
||||
JUST_PUSH="yes"
|
||||
;;
|
||||
-h|--help)
|
||||
print_usage
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option: [$1]"
|
||||
print_usage
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift # past argument or value
|
||||
done
|
||||
|
||||
export GHPAGES_URL=${GHPAGES_URL:-https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/ghpages.sh}
|
||||
export GHPAGES_DOWNLOAD_PATH=${GHPAGES_DOWNLOAD_PATH:-/tmp/ghpages.sh}
|
||||
export COMMIT_MESSAGE=${COMMIT_MESSAGE:-Updating ghpages for all projects}
|
||||
export GHPAGES_IN_REPO_PATH=${GHPAGES_IN_REPO_PATH:-docs/src/main/asciidoc/ghpages.sh}
|
||||
export AUTO_PROCEED=${AUTO_PROCEED:-yes}
|
||||
export AUTO_PUSH=${AUTO_PUSH:-yes}
|
||||
export JUST_PUSH=${JUST_PUSH:-no}
|
||||
export ROOT_FOLDER=`pwd`
|
||||
|
||||
|
||||
print_parameters
|
||||
download_ghpages
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-aws master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-aws 1.0.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-aws 1.2.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-bus master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-cli 1.0.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-cli 1.1.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-cli master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-cloudfoundry master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-cluster master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-commons master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-config master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-config 1.1.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-consul 1.0.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-consul master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-contract master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-netflix 1.0.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-netflix 1.1.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-netflix master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-security master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-sleuth 1.0.x
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-sleuth master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-starters Brixton
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-starters master
|
||||
clone_and_update_ghpages spring-cloud-incubator spring-cloud-vault-config master
|
||||
clone_and_update_ghpages spring-cloud spring-cloud-zookeeper master
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
code highlight CSS resemblign the Eclipse IDE default color schema
|
||||
@author Costin Leau
|
||||
*/
|
||||
|
||||
.hl-keyword {
|
||||
color: #7F0055;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.hl-comment {
|
||||
color: #3F5F5F;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hl-multiline-comment {
|
||||
color: #3F5FBF;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.hl-tag {
|
||||
color: #3F7F7F;
|
||||
}
|
||||
|
||||
.hl-attribute {
|
||||
color: #7F007F;
|
||||
}
|
||||
|
||||
.hl-value {
|
||||
color: #2A00FF;
|
||||
}
|
||||
|
||||
.hl-string {
|
||||
color: #2A00FF;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
@IMPORT url("manual.css");
|
||||
|
||||
body.firstpage {
|
||||
background: url("../images/background.png") no-repeat center top;
|
||||
}
|
||||
|
||||
div.part h1 {
|
||||
border-top: none;
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
@IMPORT url("manual.css");
|
||||
|
||||
body {
|
||||
background: url("../images/background.png") no-repeat center top;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,342 @@
|
||||
@IMPORT url("highlight.css");
|
||||
|
||||
html {
|
||||
padding: 0pt;
|
||||
margin: 0pt;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #333333;
|
||||
margin: 15px 30px;
|
||||
font-family: Helvetica, Arial, Freesans, Clean, Sans-serif;
|
||||
line-height: 1.6;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
code {
|
||||
font-size: 16px;
|
||||
font-family: Consolas, "Liberation Mono", Courier, monospace;
|
||||
}
|
||||
|
||||
:not(a) > code {
|
||||
color: #6D180B;
|
||||
}
|
||||
|
||||
:not(pre) > code {
|
||||
background-color: #F2F2F2;
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 4px;
|
||||
padding: 1px 3px 0;
|
||||
text-shadow: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
body > *:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
div {
|
||||
margin: 0pt;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid #CCCCCC;
|
||||
background: #CCCCCC;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #000000;
|
||||
cursor: text;
|
||||
font-weight: bold;
|
||||
margin: 30px 0 10px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin: 40px 0 10px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 70px 0 30px;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
div.part h1 {
|
||||
border-top: 1px dotted #CCCCCC;
|
||||
}
|
||||
|
||||
h1, h1 code {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
h2, h2 code {
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
h3, h3 code {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h4, h1 code, h5, h5 code, h6, h6 code {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
div.book, div.chapter, div.appendix, div.part, div.preface {
|
||||
min-width: 300px;
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
p.releaseinfo {
|
||||
font-weight: bold;
|
||||
margin-bottom: 40px;
|
||||
margin-top: 40px;
|
||||
}
|
||||
|
||||
div.authorgroup {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
p.copyright {
|
||||
line-height: 1;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
|
||||
.legalnotice p {
|
||||
font-style: italic;
|
||||
font-size: 14px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
div.titlepage + p, div.titlepage + p {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
pre {
|
||||
line-height: 1.0;
|
||||
color: black;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4183C4;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 15px 0;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
li p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.table {
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div.table table, div.informaltable table {
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
div.table td {
|
||||
padding-left: 7px;
|
||||
padding-right: 7px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
line-height: 1.4;
|
||||
padding: 0 20px;
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
}
|
||||
|
||||
.sidebar p.title {
|
||||
color: #6D180B;
|
||||
}
|
||||
|
||||
pre.programlisting, pre.screen {
|
||||
font-size: 15px;
|
||||
padding: 6px 10px;
|
||||
background-color: #F8F8F8;
|
||||
border: 1px solid #CCCCCC;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
clear: both;
|
||||
overflow: auto;
|
||||
line-height: 1.4;
|
||||
font-family: Consolas, "Liberation Mono", Courier, monospace;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
border: 1px solid #DDDDDD !important;
|
||||
border-radius: 4px !important;
|
||||
border-collapse: separate !important;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
table thead {
|
||||
background: #F5F5F5;
|
||||
}
|
||||
|
||||
table tr {
|
||||
border: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
table th, table td {
|
||||
border: none !important;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
|
||||
table tr:nth-child(2n) {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
td p {
|
||||
margin: 0 0 15px 0;
|
||||
}
|
||||
|
||||
div.table-contents td p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.important *, div.note *, div.tip *, div.warning *, div.navheader *, div.navfooter *, div.calloutlist * {
|
||||
border: none !important;
|
||||
background: none !important;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.important p, div.note p, div.tip p, div.warning p {
|
||||
color: #6F6F6F;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
div.important code, div.note code, div.tip code, div.warning code {
|
||||
background-color: #F2F2F2 !important;
|
||||
border: 1px solid #CCCCCC !important;
|
||||
border-radius: 4px !important;
|
||||
padding: 1px 3px 0 !important;
|
||||
text-shadow: none !important;
|
||||
white-space: nowrap !important;
|
||||
}
|
||||
|
||||
.note th, .tip th, .warning th {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.note tr:first-child td, .tip tr:first-child td, .warning tr:first-child td {
|
||||
border-right: 1px solid #CCCCCC !important;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
div.calloutlist p, div.calloutlist td {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div.calloutlist > table > tbody > tr > td:first-child {
|
||||
padding-left: 10px;
|
||||
width: 30px !important;
|
||||
}
|
||||
|
||||
div.important, div.note, div.tip, div.warning {
|
||||
margin-left: 0px !important;
|
||||
margin-right: 20px !important;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
div.toc {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
dl, dt {
|
||||
margin-top: 1px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
div.toc > dl > dt {
|
||||
font-size: 32px;
|
||||
font-weight: bold;
|
||||
margin: 30px 0 10px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.toc > dl > dd > dl > dt {
|
||||
font-size: 24px;
|
||||
font-weight: bold;
|
||||
margin: 20px 0 10px 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
div.toc > dl > dd > dl > dd > dl > dt {
|
||||
font-weight: bold;
|
||||
font-size: 20px;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
tbody.footnotes * {
|
||||
border: none !important;
|
||||
}
|
||||
|
||||
div.footnote p {
|
||||
margin: 0;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
div.footnote p sup {
|
||||
margin-right: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
div.navheader {
|
||||
border-bottom: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
div.navfooter {
|
||||
border-top: 1px solid #CCCCCC;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-left: -1em;
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.title > a {
|
||||
position: absolute;
|
||||
visibility: hidden;
|
||||
display: block;
|
||||
font-size: 0.85em;
|
||||
margin-top: 0.05em;
|
||||
margin-left: -1em;
|
||||
vertical-align: text-top;
|
||||
color: black;
|
||||
}
|
||||
|
||||
.title > a:before {
|
||||
content: "\00A7";
|
||||
}
|
||||
|
||||
.title:hover > a, .title > a:hover, .title:hover > a:hover {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.title:focus > a, .title > a:focus, .title:focus > a:focus {
|
||||
outline: 0;
|
||||
}
|
||||
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 65 KiB |
|
After Width: | Height: | Size: 931 B |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 178 KiB |
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
exclude-result-prefixes="xslthl d"
|
||||
version='1.0'>
|
||||
|
||||
<!-- Extensions -->
|
||||
<xsl:param name="use.extensions">1</xsl:param>
|
||||
<xsl:param name="tablecolumns.extension">0</xsl:param>
|
||||
<xsl:param name="callout.extensions">1</xsl:param>
|
||||
|
||||
<!-- Graphics -->
|
||||
<xsl:param name="admon.graphics" select="1"/>
|
||||
<xsl:param name="admon.graphics.path">images/</xsl:param>
|
||||
<xsl:param name="admon.graphics.extension">.png</xsl:param>
|
||||
|
||||
<!-- Table of Contents -->
|
||||
<xsl:param name="generate.toc">book toc,title</xsl:param>
|
||||
<xsl:param name="toc.section.depth">3</xsl:param>
|
||||
|
||||
<!-- Hide revhistory -->
|
||||
<xsl:template match="d:revhistory" mode="titlepage.mode"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
exclude-result-prefixes="xslthl d"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="common.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="html.xsl"/>
|
||||
|
||||
<xsl:param name="html.stylesheet">css/manual-multipage.css</xsl:param>
|
||||
|
||||
<xsl:param name="chunk.section.depth">'5'</xsl:param>
|
||||
<xsl:param name="use.id.as.filename">'1'</xsl:param>
|
||||
|
||||
<!-- Replace chunk-element-content from chunk-common to add firstpage class to body -->
|
||||
<xsl:template name="chunk-element-content">
|
||||
<xsl:param name="prev"/>
|
||||
<xsl:param name="next"/>
|
||||
<xsl:param name="nav.context"/>
|
||||
<xsl:param name="content">
|
||||
<xsl:apply-imports/>
|
||||
</xsl:param>
|
||||
|
||||
<xsl:call-template name="user.preroot"/>
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="html.head">
|
||||
<xsl:with-param name="prev" select="$prev"/>
|
||||
<xsl:with-param name="next" select="$next"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
<xsl:if test="count($prev) = 0">
|
||||
<xsl:attribute name="class">firstpage</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="body.attributes"/>
|
||||
<xsl:call-template name="user.header.navigation"/>
|
||||
<xsl:call-template name="header.navigation">
|
||||
<xsl:with-param name="prev" select="$prev"/>
|
||||
<xsl:with-param name="next" select="$next"/>
|
||||
<xsl:with-param name="nav.context" select="$nav.context"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="user.header.content"/>
|
||||
<xsl:copy-of select="$content"/>
|
||||
<xsl:call-template name="user.footer.content"/>
|
||||
<xsl:call-template name="footer.navigation">
|
||||
<xsl:with-param name="prev" select="$prev"/>
|
||||
<xsl:with-param name="next" select="$next"/>
|
||||
<xsl:with-param name="nav.context" select="$nav.context"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="user.footer.navigation"/>
|
||||
</body>
|
||||
</html>
|
||||
<xsl:value-of select="$chunk.append"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="html.xsl"/>
|
||||
|
||||
<xsl:param name="html.stylesheet">css/manual-singlepage.css</xsl:param>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,157 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
exclude-result-prefixes="xslthl"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
|
||||
<xsl:import href="common.xsl"/>
|
||||
|
||||
<!-- Only use scaling in FO -->
|
||||
<xsl:param name="ignore.image.scaling">1</xsl:param>
|
||||
|
||||
<!-- Use code syntax highlighting -->
|
||||
<xsl:param name="highlight.source">1</xsl:param>
|
||||
|
||||
<!-- Activate Graphics -->
|
||||
<xsl:param name="callout.graphics" select="1"/>
|
||||
<xsl:param name="callout.defaultcolumn">120</xsl:param>
|
||||
<xsl:param name="callout.graphics.path">images/callouts/</xsl:param>
|
||||
<xsl:param name="callout.graphics.extension">.png</xsl:param>
|
||||
|
||||
<xsl:param name="table.borders.with.css" select="1"/>
|
||||
<xsl:param name="html.stylesheet.type">text/css</xsl:param>
|
||||
|
||||
<xsl:param name="admonition.title.properties">text-align: left</xsl:param>
|
||||
|
||||
<!-- Leave image paths as relative when navigating XInclude -->
|
||||
<xsl:param name="keep.relative.image.uris" select="1"/>
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel.max.depth" select="2"/>
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<xsl:param name="table.footnote.number.format" select="'1'"/>
|
||||
|
||||
<!-- Remove "Chapter" from the Chapter titles... -->
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="title-numbered">
|
||||
<l:template name="chapter" text="%n. %t"/>
|
||||
<l:template name="section" text="%n %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
<!-- Syntax Highlighting -->
|
||||
<xsl:template match='xslthl:keyword' mode="xslthl">
|
||||
<span class="hl-keyword">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:comment' mode="xslthl">
|
||||
<span class="hl-comment">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:oneline-comment' mode="xslthl">
|
||||
<span class="hl-comment">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:multiline-comment' mode="xslthl">
|
||||
<span class="hl-multiline-comment">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:tag' mode="xslthl">
|
||||
<span class="hl-tag">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:attribute' mode="xslthl">
|
||||
<span class="hl-attribute">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:value' mode="xslthl">
|
||||
<span class="hl-value">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:string' mode="xslthl">
|
||||
<span class="hl-string">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Custom Title Page -->
|
||||
<xsl:template match="d:author" mode="titlepage.mode">
|
||||
<xsl:if test="name(preceding-sibling::*[1]) = 'author'">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<span class="{name(.)}">
|
||||
<xsl:call-template name="person.name"/>
|
||||
<xsl:apply-templates mode="titlepage.mode" select="./contrib"/>
|
||||
</span>
|
||||
</xsl:template>
|
||||
<xsl:template match="d:authorgroup" mode="titlepage.mode">
|
||||
<div class="{name(.)}">
|
||||
<h2>Authors</h2>
|
||||
<xsl:apply-templates mode="titlepage.mode"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Title Links -->
|
||||
<xsl:template name="anchor">
|
||||
<xsl:param name="node" select="."/>
|
||||
<xsl:param name="conditional" select="1"/>
|
||||
<xsl:variable name="id">
|
||||
<xsl:call-template name="object.id">
|
||||
<xsl:with-param name="object" select="$node"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:if test="$conditional = 0 or $node/@id or $node/@xml:id">
|
||||
<xsl:element name="a">
|
||||
<xsl:attribute name="name">
|
||||
<xsl:value-of select="$id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:text>#</xsl:text>
|
||||
<xsl:value-of select="$id"/>
|
||||
</xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,594 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:d="http://docbook.org/ns/docbook"
|
||||
xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xmlns:xslthl="http://xslthl.sourceforge.net/"
|
||||
xmlns:xlink='http://www.w3.org/1999/xlink'
|
||||
xmlns:exsl="http://exslt.org/common"
|
||||
exclude-result-prefixes="exsl xslthl d xlink"
|
||||
version='1.0'>
|
||||
|
||||
<xsl:import href="urn:docbkx:stylesheet"/>
|
||||
<xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
|
||||
<xsl:import href="common.xsl"/>
|
||||
|
||||
<!-- Extensions -->
|
||||
<xsl:param name="fop1.extensions" select="1"/>
|
||||
|
||||
<xsl:param name="paper.type" select="'A4'"/>
|
||||
<xsl:param name="page.margin.top" select="'1cm'"/>
|
||||
<xsl:param name="region.before.extent" select="'1cm'"/>
|
||||
<xsl:param name="body.margin.top" select="'1.5cm'"/>
|
||||
|
||||
<xsl:param name="body.margin.bottom" select="'1.5cm'"/>
|
||||
<xsl:param name="region.after.extent" select="'1cm'"/>
|
||||
<xsl:param name="page.margin.bottom" select="'1cm'"/>
|
||||
<xsl:param name="title.margin.left" select="'0cm'"/>
|
||||
|
||||
<!-- allow break across pages -->
|
||||
<xsl:attribute-set name="formal.object.properties">
|
||||
<xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- use color links and sensible rendering -->
|
||||
<xsl:attribute-set name="xref.properties">
|
||||
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
||||
<xsl:attribute name="color">#204060</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
<xsl:param name="ulink.show" select="0"></xsl:param>
|
||||
<xsl:param name="ulink.footnotes" select="0"></xsl:param>
|
||||
|
||||
<!-- TITLE PAGE -->
|
||||
|
||||
<xsl:template name="book.titlepage.recto">
|
||||
<fo:block>
|
||||
<fo:table table-layout="fixed" width="175mm">
|
||||
<fo:table-column column-width="175mm"/>
|
||||
<fo:table-body>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block>
|
||||
<fo:external-graphic src="images/logo.png" width="240px"
|
||||
height="auto" content-width="scale-to-fit"
|
||||
content-height="scale-to-fit"
|
||||
content-type="content-type:image/png" text-align="center"
|
||||
/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="20pt" font-weight="bold" padding="10mm">
|
||||
<xsl:value-of select="d:info/d:title"/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="14pt" padding-before="2mm">
|
||||
<xsl:value-of select="d:info/d:subtitle"/>
|
||||
</fo:block>
|
||||
<fo:block font-family="Helvetica" font-size="14pt" padding="2mm">
|
||||
<xsl:value-of select="d:info/d:releaseinfo"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block font-family="Helvetica" font-size="14pt" padding="5mm">
|
||||
<xsl:value-of select="d:info/d:pubdate"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
<fo:table-row>
|
||||
<fo:table-cell text-align="center">
|
||||
<fo:block font-family="Helvetica" font-size="10pt" padding="10mm">
|
||||
<xsl:for-each select="d:info/d:authorgroup/d:author">
|
||||
<xsl:if test="position() > 1">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:for-each>
|
||||
</fo:block>
|
||||
|
||||
<fo:block font-family="Helvetica" font-size="10pt" padding="5mm">
|
||||
<xsl:value-of select="d:info/d:pubdate"/>
|
||||
</fo:block>
|
||||
|
||||
<fo:block font-family="Helvetica" font-size="10pt" padding="5mm" padding-before="25em">
|
||||
<xsl:text>Copyright © </xsl:text><xsl:value-of select="d:info/d:copyright"/>
|
||||
</fo:block>
|
||||
|
||||
<fo:block font-family="Helvetica" font-size="8pt" padding="1mm">
|
||||
<xsl:value-of select="d:info/d:legalnotice"/>
|
||||
</fo:block>
|
||||
</fo:table-cell>
|
||||
</fo:table-row>
|
||||
</fo:table-body>
|
||||
</fo:table>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Prevent blank pages in output -->
|
||||
<xsl:template name="book.titlepage.before.verso">
|
||||
</xsl:template>
|
||||
<xsl:template name="book.titlepage.verso">
|
||||
</xsl:template>
|
||||
<xsl:template name="book.titlepage.separator">
|
||||
</xsl:template>
|
||||
|
||||
<!-- HEADER -->
|
||||
|
||||
<!-- More space in the center header for long text -->
|
||||
<xsl:attribute-set name="header.content.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$body.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">-5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">-5em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template name="header.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
|
||||
<xsl:variable name="Version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//d:title">
|
||||
<xsl:value-of select="//d:title"/><xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>please define title in your docbook file!</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$pageclass='titlepage'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<!-- FOOTER-->
|
||||
<xsl:attribute-set name="footer.content.properties">
|
||||
<xsl:attribute name="font-family">
|
||||
<xsl:value-of select="$body.font.family"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:template name="footer.content">
|
||||
<xsl:param name="pageclass" select="''"/>
|
||||
<xsl:param name="sequence" select="''"/>
|
||||
<xsl:param name="position" select="''"/>
|
||||
<xsl:param name="gentext-key" select="''"/>
|
||||
|
||||
<xsl:variable name="Version">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//d:releaseinfo">
|
||||
<xsl:value-of select="//d:releaseinfo"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="Title">
|
||||
<xsl:choose>
|
||||
<xsl:when test="//d:productname">
|
||||
<xsl:value-of select="//d:productname"/><xsl:text> </xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>please define title in your docbook file!</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$sequence='blank'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$double.sided != 0 and $position = 'left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position = 'center'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
<fo:page-number/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$pageclass='titlepage'">
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='left'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position='right'">
|
||||
<fo:page-number/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'odd' and $position='left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided != 0 and $sequence = 'even' and $position='right'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$double.sided = 0 and $position='left'">
|
||||
<xsl:value-of select="$Version"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:when test="$position='center'">
|
||||
<xsl:value-of select="$Title"/>
|
||||
</xsl:when>
|
||||
|
||||
<xsl:otherwise>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction('hard-pagebreak')">
|
||||
<fo:block break-before='page'/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- PAPER & PAGE SIZE -->
|
||||
|
||||
<!-- Paper type, no headers on blank pages, no double sided printing -->
|
||||
<xsl:param name="double.sided">0</xsl:param>
|
||||
<xsl:param name="headers.on.blank.pages">0</xsl:param>
|
||||
<xsl:param name="footers.on.blank.pages">0</xsl:param>
|
||||
|
||||
<!-- FONTS & STYLES -->
|
||||
|
||||
<xsl:param name="hyphenate">false</xsl:param>
|
||||
|
||||
<!-- Default Font size -->
|
||||
<xsl:param name="body.font.family">Helvetica</xsl:param>
|
||||
<xsl:param name="body.font.master">10</xsl:param>
|
||||
<xsl:param name="body.font.small">8</xsl:param>
|
||||
<xsl:param name="title.font.family">Helvetica</xsl:param>
|
||||
|
||||
<!-- Line height in body text -->
|
||||
<xsl:param name="line-height">1.4</xsl:param>
|
||||
|
||||
<!-- Chapter title size -->
|
||||
<xsl:attribute-set name="chapter.titlepage.recto.style">
|
||||
<xsl:attribute name="text-align">left</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.8"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Why is the font-size for chapters hardcoded in the XSL FO templates?
|
||||
Let's remove it, so this sucker can use our attribute-set only... -->
|
||||
<xsl:template match="d:title" mode="chapter.titlepage.recto.auto.mode">
|
||||
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
|
||||
xsl:use-attribute-sets="chapter.titlepage.recto.style">
|
||||
<xsl:call-template name="component.title">
|
||||
<xsl:with-param name="node" select="ancestor-or-self::d:chapter[1]"/>
|
||||
</xsl:call-template>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Sections 1, 2 and 3 titles have a small bump factor and padding -->
|
||||
<xsl:attribute-set name="section.title.level1.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.6em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.5"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="section.title.level2.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.25"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="section.title.level3.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.4em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 1.0"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="section.title.level4.properties">
|
||||
<xsl:attribute name="space-before.optimum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.3em</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master * 0.9"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- TABLES -->
|
||||
|
||||
<!-- Some padding inside tables -->
|
||||
<xsl:attribute-set name="table.cell.padding">
|
||||
<xsl:attribute name="padding-left">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">4pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">4pt</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Only hairlines as frame and cell borders in tables -->
|
||||
<xsl:param name="table.frame.border.thickness">0.1pt</xsl:param>
|
||||
<xsl:param name="table.cell.border.thickness">0.1pt</xsl:param>
|
||||
|
||||
<!-- LABELS -->
|
||||
|
||||
<!-- Label Chapters and Sections (numbering) -->
|
||||
<xsl:param name="chapter.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel" select="1"/>
|
||||
<xsl:param name="section.autolabel.max.depth" select="1"/>
|
||||
|
||||
<xsl:param name="section.label.includes.component.label" select="1"/>
|
||||
<xsl:param name="table.footnote.number.format" select="'1'"/>
|
||||
|
||||
<!-- PROGRAMLISTINGS -->
|
||||
|
||||
<!-- Verbatim text formatting (programlistings) -->
|
||||
<xsl:attribute-set name="monospace.verbatim.properties">
|
||||
<xsl:attribute name="font-size">7pt</xsl:attribute>
|
||||
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
||||
<xsl:attribute name="keep-together.within-column">1</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="verbatim.properties">
|
||||
<xsl:attribute name="space-before.minimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
|
||||
<xsl:attribute name="border-color">#444444</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="padding-top">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-right">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="padding-bottom">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">0.5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Shade (background) programlistings -->
|
||||
<xsl:param name="shade.verbatim">1</xsl:param>
|
||||
<xsl:attribute-set name="shade.verbatim.style">
|
||||
<xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="list.block.spacing">
|
||||
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="example.properties">
|
||||
<xsl:attribute name="space-before.minimum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="sidebar.properties">
|
||||
<xsl:attribute name="border-color">#444444</xsl:attribute>
|
||||
<xsl:attribute name="border-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-width">0.1pt</xsl:attribute>
|
||||
<xsl:attribute name="background-color">#F0F0F0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
|
||||
<!-- TITLE INFORMATION FOR FIGURES, EXAMPLES ETC. -->
|
||||
|
||||
<xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing">
|
||||
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
||||
<xsl:attribute name="font-style">italic</xsl:attribute>
|
||||
<xsl:attribute name="font-size">
|
||||
<xsl:value-of select="$body.font.master"/>
|
||||
<xsl:text>pt</xsl:text>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="hyphenate">false</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0.1em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- CALLOUTS -->
|
||||
|
||||
<!-- don't use images for callouts -->
|
||||
<xsl:param name="callout.graphics">0</xsl:param>
|
||||
<xsl:param name="callout.unicode">1</xsl:param>
|
||||
|
||||
<!-- Place callout marks at this column in annotated areas -->
|
||||
<xsl:param name="callout.defaultcolumn">90</xsl:param>
|
||||
|
||||
<!-- MISC -->
|
||||
|
||||
<!-- Placement of titles -->
|
||||
<xsl:param name="formal.title.placement">
|
||||
figure after
|
||||
example after
|
||||
equation before
|
||||
table before
|
||||
procedure before
|
||||
</xsl:param>
|
||||
|
||||
<!-- Format Variable Lists as Blocks (prevents horizontal overflow) -->
|
||||
<xsl:param name="variablelist.as.blocks">1</xsl:param>
|
||||
<xsl:param name="body.start.indent">0pt</xsl:param>
|
||||
|
||||
<!-- Remove "Chapter" from the Chapter titles... -->
|
||||
<xsl:param name="local.l10n.xml" select="document('')"/>
|
||||
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
|
||||
<l:l10n language="en">
|
||||
<l:context name="title-numbered">
|
||||
<l:template name="chapter" text="%n. %t"/>
|
||||
<l:template name="section" text="%n %t"/>
|
||||
</l:context>
|
||||
<l:context name="title">
|
||||
<l:template name="example" text="Example %n %t"/>
|
||||
</l:context>
|
||||
</l:l10n>
|
||||
</l:i18n>
|
||||
|
||||
<!-- admon -->
|
||||
<xsl:param name="admon.graphics" select="0"/>
|
||||
|
||||
<xsl:attribute-set name="nongraphical.admonition.properties">
|
||||
<xsl:attribute name="margin-left">0.1em</xsl:attribute>
|
||||
<xsl:attribute name="margin-right">2em</xsl:attribute>
|
||||
<xsl:attribute name="border-left-width">.75pt</xsl:attribute>
|
||||
<xsl:attribute name="border-left-style">solid</xsl:attribute>
|
||||
<xsl:attribute name="border-left-color">#5c5c4f</xsl:attribute>
|
||||
<xsl:attribute name="padding-left">0.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.optimum">1.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">1.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">1.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.optimum">1.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.minimum">1.5em</xsl:attribute>
|
||||
<xsl:attribute name="space-after.maximum">1.5em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="admonition.title.properties">
|
||||
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
||||
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
||||
<xsl:attribute name="hyphenate">false</xsl:attribute>
|
||||
<xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
|
||||
<xsl:attribute name="margin-left">0</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<xsl:attribute-set name="admonition.properties">
|
||||
<xsl:attribute name="space-before.optimum">0em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.minimum">0em</xsl:attribute>
|
||||
<xsl:attribute name="space-before.maximum">0em</xsl:attribute>
|
||||
</xsl:attribute-set>
|
||||
|
||||
<!-- Asciidoc -->
|
||||
<xsl:template match="processing-instruction('asciidoc-br')">
|
||||
<fo:block/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction('asciidoc-hr')">
|
||||
<fo:block space-after="1em">
|
||||
<fo:leader leader-pattern="rule" rule-thickness="0.5pt" rule-style="solid" leader-length.minimum="100%"/>
|
||||
</fo:block>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="processing-instruction('asciidoc-pagebreak')">
|
||||
<fo:block break-after='page'/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- SYNTAX HIGHLIGHT -->
|
||||
|
||||
<xsl:template match='xslthl:keyword' mode="xslthl">
|
||||
<fo:inline font-weight="bold" color="#7F0055">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:string' mode="xslthl">
|
||||
<fo:inline font-weight="bold" font-style="italic" color="#2A00FF">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:comment' mode="xslthl">
|
||||
<fo:inline font-style="italic" color="#3F5FBF">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:tag' mode="xslthl">
|
||||
<fo:inline font-weight="bold" color="#3F7F7F">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:attribute' mode="xslthl">
|
||||
<fo:inline font-weight="bold" color="#7F007F">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match='xslthl:value' mode="xslthl">
|
||||
<fo:inline font-weight="bold" color="#2A00FF">
|
||||
<xsl:apply-templates mode="xslthl"/>
|
||||
</fo:inline>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xslthl-config>
|
||||
<highlighter id="java" file="./xslthl/java-hl.xml"/>
|
||||
<highlighter id="groovy" file="./xslthl/java-hl.xml"/>
|
||||
<highlighter id="html" file="./xslthl/html-hl.xml"/>
|
||||
<highlighter id="ini" file="./xslthl/ini-hl.xml"/>
|
||||
<highlighter id="php" file="./xslthl/php-hl.xml"/>
|
||||
<highlighter id="c" file="./xslthl/c-hl.xml"/>
|
||||
<highlighter id="cpp" file="./xslthl/cpp-hl.xml"/>
|
||||
<highlighter id="csharp" file="./xslthl/csharp-hl.xml"/>
|
||||
<highlighter id="python" file="./xslthl/python-hl.xml"/>
|
||||
<highlighter id="ruby" file="./xslthl/ruby-hl.xml"/>
|
||||
<highlighter id="perl" file="./xslthl/perl-hl.xml"/>
|
||||
<highlighter id="javascript" file="./xslthl/javascript-hl.xml"/>
|
||||
<highlighter id="bash" file="./xslthl/bourne-hl.xml"/>
|
||||
<highlighter id="css" file="./xslthl/css-hl.xml"/>
|
||||
<highlighter id="sql" file="./xslthl/sql2003-hl.xml"/>
|
||||
<highlighter id="asciidoc" file="./xslthl/asciidoc-hl.xml"/>
|
||||
<highlighter id="properties" file="./xslthl/properties-hl.xml"/>
|
||||
<highlighter id="json" file="./xslthl/json-hl.xml"/>
|
||||
<highlighter id="yaml" file="./xslthl/yaml-hl.xml"/>
|
||||
<namespace prefix="xslthl" uri="http://xslthl.sourceforge.net/"/>
|
||||
</xslthl-config>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for AsciiDoc files
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>////</start>
|
||||
<end>////</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start>//</start>
|
||||
<solitary/>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(={1,6} .+)$</pattern>
|
||||
<style>heading</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(\.[^\.\s].+)$</pattern>
|
||||
<style>title</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(:!?\w.*?:)</pattern>
|
||||
<style>attribute</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(-|\*{1,5}|\d*\.{1,5})(?= .+$)</pattern>
|
||||
<style>bullet</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(\[.+\])$</pattern>
|
||||
<style>attribute</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,95 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for SH
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2010 Mathieu Malaterre
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<</start>
|
||||
<quote>'</quote>
|
||||
<quote>"</quote>
|
||||
<flag>-</flag>
|
||||
<noWhiteSpace/>
|
||||
<looseTerminator/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- reserved words -->
|
||||
<keyword>if</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>fi</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>esac</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>done</keyword>
|
||||
<!-- built-ins -->
|
||||
<keyword>exec</keyword>
|
||||
<keyword>shift</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>times</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>trap</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>readonly</keyword>
|
||||
<keyword>wait</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>return</keyword>
|
||||
<!-- other commands -->
|
||||
<keyword>cd</keyword>
|
||||
<keyword>echo</keyword>
|
||||
<keyword>hash</keyword>
|
||||
<keyword>pwd</keyword>
|
||||
<keyword>read</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>test</keyword>
|
||||
<keyword>type</keyword>
|
||||
<keyword>ulimit</keyword>
|
||||
<keyword>umask</keyword>
|
||||
<keyword>unset</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Syntax highlighting definition for C
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start><![CDATA[/// ]]></start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<!-- use the online-comment highlighter to detect directives -->
|
||||
<start>#</start>
|
||||
<lineBreakEscape>\</lineBreakEscape>
|
||||
<style>directive</style>
|
||||
<solitary/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<exponent>e</exponent>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>f</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>auto</keyword>
|
||||
<keyword>_Bool</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>_Complex</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>_Imaginary</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>restrict</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>typedef</keyword>
|
||||
<keyword>union</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,151 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for C++
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start><![CDATA[/// ]]></start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<!-- use the online-comment highlighter to detect directives -->
|
||||
<start>#</start>
|
||||
<lineBreakEscape>\</lineBreakEscape>
|
||||
<style>directive</style>
|
||||
<solitary/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<exponent>e</exponent>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>f</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- C keywords -->
|
||||
<keyword>auto</keyword>
|
||||
<keyword>_Bool</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>_Complex</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>_Imaginary</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>register</keyword>
|
||||
<keyword>restrict</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>signed</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>typedef</keyword>
|
||||
<keyword>union</keyword>
|
||||
<keyword>unsigned</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
<!-- C++ keywords -->
|
||||
<keyword>asm</keyword>
|
||||
<keyword>dynamic_cast</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>reinterpret_cast</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>explicit</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>static_cast</keyword>
|
||||
<keyword>typeid</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>operator</keyword>
|
||||
<keyword>template</keyword>
|
||||
<keyword>typename</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>friend</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>const_cast</keyword>
|
||||
<keyword>inline</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>mutable</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>wchar_t</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,194 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for C#
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start>///</start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="annotation">
|
||||
<!-- annotations are called (custom) "attributes" in .NET -->
|
||||
<start>[</start>
|
||||
<end>]</end>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<!-- C# supports a couple of directives -->
|
||||
<start>#</start>
|
||||
<lineBreakEscape>\</lineBreakEscape>
|
||||
<style>directive</style>
|
||||
<solitary/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<!-- strings starting with an "@" can span multiple lines -->
|
||||
<string>@"</string>
|
||||
<endString>"</endString>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<exponent>e</exponent>
|
||||
<suffix>ul</suffix>
|
||||
<suffix>lu</suffix>
|
||||
<suffix>u</suffix>
|
||||
<suffix>f</suffix>
|
||||
<suffix>d</suffix>
|
||||
<suffix>m</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>base</keyword>
|
||||
<keyword>bool</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>checked</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>decimal</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delegate</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>event</keyword>
|
||||
<keyword>explicit</keyword>
|
||||
<keyword>extern</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>fixed</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implicit</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>internal</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>lock</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>null</keyword>
|
||||
<keyword>object</keyword>
|
||||
<keyword>operator</keyword>
|
||||
<keyword>out</keyword>
|
||||
<keyword>override</keyword>
|
||||
<keyword>params</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>readonly</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>sbyte</keyword>
|
||||
<keyword>sealed</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>sizeof</keyword>
|
||||
<keyword>stackalloc</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>string</keyword>
|
||||
<keyword>struct</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>uint</keyword>
|
||||
<keyword>ulong</keyword>
|
||||
<keyword>unchecked</keyword>
|
||||
<keyword>unsafe</keyword>
|
||||
<keyword>ushort</keyword>
|
||||
<keyword>using</keyword>
|
||||
<keyword>virtual</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<!-- special words, not really keywords -->
|
||||
<keyword>add</keyword>
|
||||
<keyword>alias</keyword>
|
||||
<keyword>from</keyword>
|
||||
<keyword>get</keyword>
|
||||
<keyword>global</keyword>
|
||||
<keyword>group</keyword>
|
||||
<keyword>into</keyword>
|
||||
<keyword>join</keyword>
|
||||
<keyword>orderby</keyword>
|
||||
<keyword>partial</keyword>
|
||||
<keyword>remove</keyword>
|
||||
<keyword>select</keyword>
|
||||
<keyword>set</keyword>
|
||||
<keyword>value</keyword>
|
||||
<keyword>where</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for CSS files
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2011-2012 Martin Hujer, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Martin Hujer <mhujer at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
Reference: https://www.w3.org/TR/CSS21/propidx.html
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
</highlighter>
|
||||
<highlighter type="word">
|
||||
<word>@charset</word>
|
||||
<word>@import</word>
|
||||
<word>@media</word>
|
||||
<word>@page</word>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<partChars>-</partChars>
|
||||
<keyword>azimuth</keyword>
|
||||
<keyword>background-attachment</keyword>
|
||||
<keyword>background-color</keyword>
|
||||
<keyword>background-image</keyword>
|
||||
<keyword>background-position</keyword>
|
||||
<keyword>background-repeat</keyword>
|
||||
<keyword>background</keyword>
|
||||
<keyword>border-collapse</keyword>
|
||||
<keyword>border-color</keyword>
|
||||
<keyword>border-spacing</keyword>
|
||||
<keyword>border-style</keyword>
|
||||
<keyword>border-top</keyword>
|
||||
<keyword>border-right</keyword>
|
||||
<keyword>border-bottom</keyword>
|
||||
<keyword>border-left</keyword>
|
||||
<keyword>border-top-color</keyword>
|
||||
<keyword>border-right-color</keyword>
|
||||
<keyword>border-bottom-color</keyword>
|
||||
<keyword>border-left-color</keyword>
|
||||
<keyword>border-top-style</keyword>
|
||||
<keyword>border-right-style</keyword>
|
||||
<keyword>border-bottom-style</keyword>
|
||||
<keyword>border-left-style</keyword>
|
||||
<keyword>border-top-width</keyword>
|
||||
<keyword>border-right-width</keyword>
|
||||
<keyword>border-bottom-width</keyword>
|
||||
<keyword>border-left-width</keyword>
|
||||
<keyword>border-width</keyword>
|
||||
<keyword>border</keyword>
|
||||
<keyword>bottom</keyword>
|
||||
<keyword>caption-side</keyword>
|
||||
<keyword>clear</keyword>
|
||||
<keyword>clip</keyword>
|
||||
<keyword>color</keyword>
|
||||
<keyword>content</keyword>
|
||||
<keyword>counter-increment</keyword>
|
||||
<keyword>counter-reset</keyword>
|
||||
<keyword>cue-after</keyword>
|
||||
<keyword>cue-before</keyword>
|
||||
<keyword>cue</keyword>
|
||||
<keyword>cursor</keyword>
|
||||
<keyword>direction</keyword>
|
||||
<keyword>display</keyword>
|
||||
<keyword>elevation</keyword>
|
||||
<keyword>empty-cells</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>font-family</keyword>
|
||||
<keyword>font-size</keyword>
|
||||
<keyword>font-style</keyword>
|
||||
<keyword>font-variant</keyword>
|
||||
<keyword>font-weight</keyword>
|
||||
<keyword>font</keyword>
|
||||
<keyword>height</keyword>
|
||||
<keyword>left</keyword>
|
||||
<keyword>letter-spacing</keyword>
|
||||
<keyword>line-height</keyword>
|
||||
<keyword>list-style-image</keyword>
|
||||
<keyword>list-style-position</keyword>
|
||||
<keyword>list-style-type</keyword>
|
||||
<keyword>list-style</keyword>
|
||||
<keyword>margin-right</keyword>
|
||||
<keyword>margin-left</keyword>
|
||||
<keyword>margin-top</keyword>
|
||||
<keyword>margin-bottom</keyword>
|
||||
<keyword>margin</keyword>
|
||||
<keyword>max-height</keyword>
|
||||
<keyword>max-width</keyword>
|
||||
<keyword>min-height</keyword>
|
||||
<keyword>min-width</keyword>
|
||||
<keyword>orphans</keyword>
|
||||
<keyword>outline-color</keyword>
|
||||
<keyword>outline-style</keyword>
|
||||
<keyword>outline-width</keyword>
|
||||
<keyword>outline</keyword>
|
||||
<keyword>overflow</keyword>
|
||||
<keyword>padding-top</keyword>
|
||||
<keyword>padding-right</keyword>
|
||||
<keyword>padding-bottom</keyword>
|
||||
<keyword>padding-left</keyword>
|
||||
<keyword>padding</keyword>
|
||||
<keyword>page-break-after</keyword>
|
||||
<keyword>page-break-before</keyword>
|
||||
<keyword>page-break-inside</keyword>
|
||||
<keyword>pause-after</keyword>
|
||||
<keyword>pause-before</keyword>
|
||||
<keyword>pause</keyword>
|
||||
<keyword>pitch-range</keyword>
|
||||
<keyword>pitch</keyword>
|
||||
<keyword>play-during</keyword>
|
||||
<keyword>position</keyword>
|
||||
<keyword>quotes</keyword>
|
||||
<keyword>richness</keyword>
|
||||
<keyword>right</keyword>
|
||||
<keyword>speak-header</keyword>
|
||||
<keyword>speak-numeral</keyword>
|
||||
<keyword>speak-punctuation</keyword>
|
||||
<keyword>speak</keyword>
|
||||
<keyword>speech-rate</keyword>
|
||||
<keyword>stress</keyword>
|
||||
<keyword>table-layout</keyword>
|
||||
<keyword>text-align</keyword>
|
||||
<keyword>text-decoration</keyword>
|
||||
<keyword>text-indent</keyword>
|
||||
<keyword>text-transform</keyword>
|
||||
<keyword>top</keyword>
|
||||
<keyword>unicode-bidi</keyword>
|
||||
<keyword>vertical-align</keyword>
|
||||
<keyword>visibility</keyword>
|
||||
<keyword>voice-family</keyword>
|
||||
<keyword>volume</keyword>
|
||||
<keyword>white-space</keyword>
|
||||
<keyword>widows</keyword>
|
||||
<keyword>width</keyword>
|
||||
<keyword>word-spacing</keyword>
|
||||
<keyword>z-index</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,122 @@
|
||||
<?xml version='1.0'?>
|
||||
<!--
|
||||
|
||||
Bakalarska prace: Zvyraznovani syntaxe v XSLT
|
||||
Michal Molhanec 2005
|
||||
|
||||
myxml-hl.xml - konfigurace zvyraznovace XML, ktera zvlast zvyrazni
|
||||
HTML elementy a XSL elementy
|
||||
|
||||
This file has been customized for the Asciidoctor project (https://asciidoctor.org).
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="xml">
|
||||
<elementSet>
|
||||
<style>htmltag</style>
|
||||
<element>a</element>
|
||||
<element>abbr</element>
|
||||
<element>address</element>
|
||||
<element>area</element>
|
||||
<element>article</element>
|
||||
<element>aside</element>
|
||||
<element>audio</element>
|
||||
<element>b</element>
|
||||
<element>base</element>
|
||||
<element>bdi</element>
|
||||
<element>blockquote</element>
|
||||
<element>body</element>
|
||||
<element>br</element>
|
||||
<element>button</element>
|
||||
<element>caption</element>
|
||||
<element>canvas</element>
|
||||
<element>cite</element>
|
||||
<element>code</element>
|
||||
<element>command</element>
|
||||
<element>col</element>
|
||||
<element>colgroup</element>
|
||||
<element>dd</element>
|
||||
<element>del</element>
|
||||
<element>dialog</element>
|
||||
<element>div</element>
|
||||
<element>dl</element>
|
||||
<element>dt</element>
|
||||
<element>em</element>
|
||||
<element>embed</element>
|
||||
<element>fieldset</element>
|
||||
<element>figcaption</element>
|
||||
<element>figure</element>
|
||||
<element>font</element>
|
||||
<element>form</element>
|
||||
<element>footer</element>
|
||||
<element>h1</element>
|
||||
<element>h2</element>
|
||||
<element>h3</element>
|
||||
<element>h4</element>
|
||||
<element>h5</element>
|
||||
<element>h6</element>
|
||||
<element>head</element>
|
||||
<element>header</element>
|
||||
<element>hr</element>
|
||||
<element>html</element>
|
||||
<element>i</element>
|
||||
<element>iframe</element>
|
||||
<element>img</element>
|
||||
<element>input</element>
|
||||
<element>ins</element>
|
||||
<element>kbd</element>
|
||||
<element>label</element>
|
||||
<element>legend</element>
|
||||
<element>li</element>
|
||||
<element>link</element>
|
||||
<element>map</element>
|
||||
<element>mark</element>
|
||||
<element>menu</element>
|
||||
<element>menu</element>
|
||||
<element>meta</element>
|
||||
<element>nav</element>
|
||||
<element>noscript</element>
|
||||
<element>object</element>
|
||||
<element>ol</element>
|
||||
<element>optgroup</element>
|
||||
<element>option</element>
|
||||
<element>p</element>
|
||||
<element>param</element>
|
||||
<element>pre</element>
|
||||
<element>q</element>
|
||||
<element>samp</element>
|
||||
<element>script</element>
|
||||
<element>section</element>
|
||||
<element>select</element>
|
||||
<element>small</element>
|
||||
<element>source</element>
|
||||
<element>span</element>
|
||||
<element>strong</element>
|
||||
<element>style</element>
|
||||
<element>sub</element>
|
||||
<element>summary</element>
|
||||
<element>sup</element>
|
||||
<element>table</element>
|
||||
<element>tbody</element>
|
||||
<element>td</element>
|
||||
<element>textarea</element>
|
||||
<element>tfoot</element>
|
||||
<element>th</element>
|
||||
<element>thead</element>
|
||||
<element>time</element>
|
||||
<element>title</element>
|
||||
<element>tr</element>
|
||||
<element>track</element>
|
||||
<element>u</element>
|
||||
<element>ul</element>
|
||||
<element>var</element>
|
||||
<element>video</element>
|
||||
<element>wbr</element>
|
||||
<element>xmp</element>
|
||||
<ignoreCase/>
|
||||
</elementSet>
|
||||
<elementPrefix>
|
||||
<style>namespace</style>
|
||||
<prefix>xsl:</prefix>
|
||||
</elementPrefix>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,45 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for ini files
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">;</highlighter>
|
||||
<highlighter type="regex">
|
||||
<!-- ini sections -->
|
||||
<pattern>^(\[.+\]\s*)$</pattern>
|
||||
<style>keyword</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<!-- the keys in an ini section -->
|
||||
<pattern>^(.+)(?==)</pattern>
|
||||
<style>attribute</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Java
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="annotation">
|
||||
<start>@</start>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<suffix>f</suffix>
|
||||
<suffix>d</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>instanceof</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>native</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>strictfp</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>throws</keyword>
|
||||
<keyword>transient</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
<keyword>while</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for JavaScript
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>delete</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>instanceof</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>this</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>typeof</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>void</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>with</keyword>
|
||||
<!-- future keywords -->
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>boolean</keyword>
|
||||
<keyword>byte</keyword>
|
||||
<keyword>char</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>debugger</keyword>
|
||||
<keyword>double</keyword>
|
||||
<keyword>enum</keyword>
|
||||
<keyword>export</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>float</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>int</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>long</keyword>
|
||||
<keyword>native</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>short</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>synchronized</keyword>
|
||||
<keyword>throws</keyword>
|
||||
<keyword>transient</keyword>
|
||||
<keyword>volatile</keyword>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>prototype</keyword>
|
||||
<!-- Global Objects -->
|
||||
<keyword>Array</keyword>
|
||||
<keyword>Boolean</keyword>
|
||||
<keyword>Date</keyword>
|
||||
<keyword>Error</keyword>
|
||||
<keyword>EvalError</keyword>
|
||||
<keyword>Function</keyword>
|
||||
<keyword>Math</keyword>
|
||||
<keyword>Number</keyword>
|
||||
<keyword>Object</keyword>
|
||||
<keyword>RangeError</keyword>
|
||||
<keyword>ReferenceError</keyword>
|
||||
<keyword>RegExp</keyword>
|
||||
<keyword>String</keyword>
|
||||
<keyword>SyntaxError</keyword>
|
||||
<keyword>TypeError</keyword>
|
||||
<keyword>URIError</keyword>
|
||||
<!-- Global functions -->
|
||||
<keyword>decodeURI</keyword>
|
||||
<keyword>decodeURIComponent</keyword>
|
||||
<keyword>encodeURI</keyword>
|
||||
<keyword>encodeURIComponent</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>isFinite</keyword>
|
||||
<keyword>isNaN</keyword>
|
||||
<keyword>parseFloat</keyword>
|
||||
<keyword>parseInt</keyword>
|
||||
<!-- Global properties -->
|
||||
<keyword>Infinity</keyword>
|
||||
<keyword>NaN</keyword>
|
||||
<keyword>undefined</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="annotation">
|
||||
<start>@</start>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<suffix>f</suffix>
|
||||
<suffix>d</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</highlighter>
|
||||
<highlighter type="word">
|
||||
<word>{</word>
|
||||
<word>}</word>
|
||||
<word>,</word>
|
||||
<word>[</word>
|
||||
<word>]</word>
|
||||
<style>keyword</style>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Perl
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<</start>
|
||||
<quote>'</quote>
|
||||
<quote>"</quote>
|
||||
<noWhiteSpace/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>if</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>given</keyword>
|
||||
<!-- Keywords related to the control flow of your perl program -->
|
||||
<keyword>caller</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>die</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>dump</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>last</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>redo</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>sub</keyword>
|
||||
<keyword>wantarray</keyword>
|
||||
<!-- Keywords related to scoping -->
|
||||
<keyword>caller</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>local</keyword>
|
||||
<keyword>my</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>use</keyword>
|
||||
<!-- Keywords related to perl modules -->
|
||||
<keyword>do</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>no</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>require</keyword>
|
||||
<keyword>use</keyword>
|
||||
<!-- Keywords related to classes and object-orientedness -->
|
||||
<keyword>bless</keyword>
|
||||
<keyword>dbmclose</keyword>
|
||||
<keyword>dbmopen</keyword>
|
||||
<keyword>package</keyword>
|
||||
<keyword>ref</keyword>
|
||||
<keyword>tie</keyword>
|
||||
<keyword>tied</keyword>
|
||||
<keyword>untie</keyword>
|
||||
<keyword>use</keyword>
|
||||
<!-- operators -->
|
||||
<keyword>and</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>eq</keyword>
|
||||
<keyword>ne</keyword>
|
||||
<keyword>lt</keyword>
|
||||
<keyword>gt</keyword>
|
||||
<keyword>le</keyword>
|
||||
<keyword>ge</keyword>
|
||||
<keyword>cmp</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,154 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for PHP
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/**</start>
|
||||
<end>*/</end>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">
|
||||
<start><![CDATA[/// ]]></start>
|
||||
<style>doccomment</style>
|
||||
</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">//</highlighter>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<<</start>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>and</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>xor</keyword>
|
||||
<keyword>__FILE__</keyword>
|
||||
<keyword>exception</keyword>
|
||||
<keyword>__LINE__</keyword>
|
||||
<keyword>array</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>const</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>declare</keyword>
|
||||
<keyword>default</keyword>
|
||||
<keyword>die</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>echo</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elseif</keyword>
|
||||
<keyword>empty</keyword>
|
||||
<keyword>enddeclare</keyword>
|
||||
<keyword>endfor</keyword>
|
||||
<keyword>endforeach</keyword>
|
||||
<keyword>endif</keyword>
|
||||
<keyword>endswitch</keyword>
|
||||
<keyword>endwhile</keyword>
|
||||
<keyword>eval</keyword>
|
||||
<keyword>exit</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>foreach</keyword>
|
||||
<keyword>function</keyword>
|
||||
<keyword>global</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>include</keyword>
|
||||
<keyword>include_once</keyword>
|
||||
<keyword>isset</keyword>
|
||||
<keyword>list</keyword>
|
||||
<keyword>new</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>require</keyword>
|
||||
<keyword>require_once</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>static</keyword>
|
||||
<keyword>switch</keyword>
|
||||
<keyword>unset</keyword>
|
||||
<keyword>use</keyword>
|
||||
<keyword>var</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>__FUNCTION__</keyword>
|
||||
<keyword>__CLASS__</keyword>
|
||||
<keyword>__METHOD__</keyword>
|
||||
<keyword>final</keyword>
|
||||
<keyword>php_user_filter</keyword>
|
||||
<keyword>interface</keyword>
|
||||
<keyword>implements</keyword>
|
||||
<keyword>extends</keyword>
|
||||
<keyword>public</keyword>
|
||||
<keyword>private</keyword>
|
||||
<keyword>protected</keyword>
|
||||
<keyword>abstract</keyword>
|
||||
<keyword>clone</keyword>
|
||||
<keyword>try</keyword>
|
||||
<keyword>catch</keyword>
|
||||
<keyword>throw</keyword>
|
||||
<keyword>cfunction</keyword>
|
||||
<keyword>old_function</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
<!-- PHP 5.3 -->
|
||||
<keyword>namespace</keyword>
|
||||
<keyword>__NAMESPACE__</keyword>
|
||||
<keyword>goto</keyword>
|
||||
<keyword>__DIR__</keyword>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="word">
|
||||
<!-- highlight the php open and close tags as directives -->
|
||||
<word>?></word>
|
||||
<word><?php</word>
|
||||
<word><?=</word>
|
||||
<style>directive</style>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Java
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(.+?)(?==|:)</pattern>
|
||||
<style>attribute</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Python
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="annotation">
|
||||
<!-- these are actually called decorators -->
|
||||
<start>@</start>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"""</string>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'''</string>
|
||||
<spanNewLines/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<exponent>e</exponent>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>and</keyword>
|
||||
<keyword>del</keyword>
|
||||
<keyword>from</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>as</keyword>
|
||||
<keyword>elif</keyword>
|
||||
<keyword>global</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>with</keyword>
|
||||
<keyword>assert</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>pass</keyword>
|
||||
<keyword>yield</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>except</keyword>
|
||||
<keyword>import</keyword>
|
||||
<keyword>print</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>exec</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>raise</keyword>
|
||||
<keyword>continue</keyword>
|
||||
<keyword>finally</keyword>
|
||||
<keyword>is</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>lambda</keyword>
|
||||
<keyword>try</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for Ruby
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2005-2008 Michal Molhanec, Jirka Kosek, Michiel Hendriks
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Michal Molhanec <mol1111 at users.sourceforge.net>
|
||||
Jirka Kosek <kosek at users.sourceforge.net>
|
||||
Michiel Hendriks <elmuerte at users.sourceforge.net>
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="heredoc">
|
||||
<start><<</start>
|
||||
<noWhiteSpace/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>%Q{</string>
|
||||
<endString>}</endString>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>%/</string>
|
||||
<endString>/</endString>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>%q{</string>
|
||||
<endString>}</endString>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="hexnumber">
|
||||
<prefix>0x</prefix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>alias</keyword>
|
||||
<keyword>and</keyword>
|
||||
<keyword>BEGIN</keyword>
|
||||
<keyword>begin</keyword>
|
||||
<keyword>break</keyword>
|
||||
<keyword>case</keyword>
|
||||
<keyword>class</keyword>
|
||||
<keyword>def</keyword>
|
||||
<keyword>defined</keyword>
|
||||
<keyword>do</keyword>
|
||||
<keyword>else</keyword>
|
||||
<keyword>elsif</keyword>
|
||||
<keyword>END</keyword>
|
||||
<keyword>end</keyword>
|
||||
<keyword>ensure</keyword>
|
||||
<keyword>false</keyword>
|
||||
<keyword>for</keyword>
|
||||
<keyword>if</keyword>
|
||||
<keyword>in</keyword>
|
||||
<keyword>module</keyword>
|
||||
<keyword>next</keyword>
|
||||
<keyword>nil</keyword>
|
||||
<keyword>not</keyword>
|
||||
<keyword>or</keyword>
|
||||
<keyword>redo</keyword>
|
||||
<keyword>rescue</keyword>
|
||||
<keyword>retry</keyword>
|
||||
<keyword>return</keyword>
|
||||
<keyword>self</keyword>
|
||||
<keyword>super</keyword>
|
||||
<keyword>then</keyword>
|
||||
<keyword>true</keyword>
|
||||
<keyword>undef</keyword>
|
||||
<keyword>unless</keyword>
|
||||
<keyword>until</keyword>
|
||||
<keyword>when</keyword>
|
||||
<keyword>while</keyword>
|
||||
<keyword>yield</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,565 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
|
||||
Syntax highlighting definition for SQL:1999
|
||||
|
||||
xslthl - XSLT Syntax Highlighting
|
||||
https://sourceforge.net/projects/xslthl/
|
||||
Copyright (C) 2012 Michiel Hendriks, Martin Hujer, k42b3
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
-->
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">--</highlighter>
|
||||
<highlighter type="multiline-comment">
|
||||
<start>/*</start>
|
||||
<end>*/</end>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<doubleEscapes/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>U'</string>
|
||||
<endString>'</endString>
|
||||
<doubleEscapes/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>B'</string>
|
||||
<endString>'</endString>
|
||||
<doubleEscapes/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>N'</string>
|
||||
<endString>'</endString>
|
||||
<doubleEscapes/>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>X'</string>
|
||||
<endString>'</endString>
|
||||
<doubleEscapes/>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<pointStarts/>
|
||||
<exponent>e</exponent>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<ignoreCase/>
|
||||
<!-- reserved -->
|
||||
<keyword>A</keyword>
|
||||
<keyword>ABS</keyword>
|
||||
<keyword>ABSOLUTE</keyword>
|
||||
<keyword>ACTION</keyword>
|
||||
<keyword>ADA</keyword>
|
||||
<keyword>ADMIN</keyword>
|
||||
<keyword>AFTER</keyword>
|
||||
<keyword>ALWAYS</keyword>
|
||||
<keyword>ASC</keyword>
|
||||
<keyword>ASSERTION</keyword>
|
||||
<keyword>ASSIGNMENT</keyword>
|
||||
<keyword>ATTRIBUTE</keyword>
|
||||
<keyword>ATTRIBUTES</keyword>
|
||||
<keyword>AVG</keyword>
|
||||
<keyword>BEFORE</keyword>
|
||||
<keyword>BERNOULLI</keyword>
|
||||
<keyword>BREADTH</keyword>
|
||||
<keyword>C</keyword>
|
||||
<keyword>CARDINALITY</keyword>
|
||||
<keyword>CASCADE</keyword>
|
||||
<keyword>CATALOG_NAME</keyword>
|
||||
<keyword>CATALOG</keyword>
|
||||
<keyword>CEIL</keyword>
|
||||
<keyword>CEILING</keyword>
|
||||
<keyword>CHAIN</keyword>
|
||||
<keyword>CHAR_LENGTH</keyword>
|
||||
<keyword>CHARACTER_LENGTH</keyword>
|
||||
<keyword>CHARACTER_SET_CATALOG</keyword>
|
||||
<keyword>CHARACTER_SET_NAME</keyword>
|
||||
<keyword>CHARACTER_SET_SCHEMA</keyword>
|
||||
<keyword>CHARACTERISTICS</keyword>
|
||||
<keyword>CHARACTERS</keyword>
|
||||
<keyword>CHECKED</keyword>
|
||||
<keyword>CLASS_ORIGIN</keyword>
|
||||
<keyword>COALESCE</keyword>
|
||||
<keyword>COBOL</keyword>
|
||||
<keyword>CODE_UNITS</keyword>
|
||||
<keyword>COLLATION_CATALOG</keyword>
|
||||
<keyword>COLLATION_NAME</keyword>
|
||||
<keyword>COLLATION_SCHEMA</keyword>
|
||||
<keyword>COLLATION</keyword>
|
||||
<keyword>COLLECT</keyword>
|
||||
<keyword>COLUMN_NAME</keyword>
|
||||
<keyword>COMMAND_FUNCTION_CODE</keyword>
|
||||
<keyword>COMMAND_FUNCTION</keyword>
|
||||
<keyword>COMMITTED</keyword>
|
||||
<keyword>CONDITION_NUMBER</keyword>
|
||||
<keyword>CONDITION</keyword>
|
||||
<keyword>CONNECTION_NAME</keyword>
|
||||
<keyword>CONSTRAINT_CATALOG</keyword>
|
||||
<keyword>CONSTRAINT_NAME</keyword>
|
||||
<keyword>CONSTRAINT_SCHEMA</keyword>
|
||||
<keyword>CONSTRAINTS</keyword>
|
||||
<keyword>CONSTRUCTORS</keyword>
|
||||
<keyword>CONTAINS</keyword>
|
||||
<keyword>CONVERT</keyword>
|
||||
<keyword>CORR</keyword>
|
||||
<keyword>COUNT</keyword>
|
||||
<keyword>COVAR_POP</keyword>
|
||||
<keyword>COVAR_SAMP</keyword>
|
||||
<keyword>CUME_DIST</keyword>
|
||||
<keyword>CURRENT_COLLATION</keyword>
|
||||
<keyword>CURSOR_NAME</keyword>
|
||||
<keyword>DATA</keyword>
|
||||
<keyword>DATETIME_INTERVAL_CODE</keyword>
|
||||
<keyword>DATETIME_INTERVAL_PRECISION</keyword>
|
||||
<keyword>DEFAULTS</keyword>
|
||||
<keyword>DEFERRABLE</keyword>
|
||||
<keyword>DEFERRED</keyword>
|
||||
<keyword>DEFINED</keyword>
|
||||
<keyword>DEFINER</keyword>
|
||||
<keyword>DEGREE</keyword>
|
||||
<keyword>DENSE_RANK</keyword>
|
||||
<keyword>DEPTH</keyword>
|
||||
<keyword>DERIVED</keyword>
|
||||
<keyword>DESC</keyword>
|
||||
<keyword>DESCRIPTOR</keyword>
|
||||
<keyword>DIAGNOSTICS</keyword>
|
||||
<keyword>DISPATCH</keyword>
|
||||
<keyword>DOMAIN</keyword>
|
||||
<keyword>DYNAMIC_FUNCTION_CODE</keyword>
|
||||
<keyword>DYNAMIC_FUNCTION</keyword>
|
||||
<keyword>EQUALS</keyword>
|
||||
<keyword>EVERY</keyword>
|
||||
<keyword>EXCEPTION</keyword>
|
||||
<keyword>EXCLUDE</keyword>
|
||||
<keyword>EXCLUDING</keyword>
|
||||
<keyword>EXP</keyword>
|
||||
<keyword>EXTRACT</keyword>
|
||||
<keyword>FINAL</keyword>
|
||||
<keyword>FIRST</keyword>
|
||||
<keyword>FLOOR</keyword>
|
||||
<keyword>FOLLOWING</keyword>
|
||||
<keyword>FORTRAN</keyword>
|
||||
<keyword>FOUND</keyword>
|
||||
<keyword>FUSION</keyword>
|
||||
<keyword>G</keyword>
|
||||
<keyword>GENERAL</keyword>
|
||||
<keyword>GO</keyword>
|
||||
<keyword>GOTO</keyword>
|
||||
<keyword>GRANTED</keyword>
|
||||
<keyword>HIERARCHY</keyword>
|
||||
<keyword>IMPLEMENTATION</keyword>
|
||||
<keyword>INCLUDING</keyword>
|
||||
<keyword>INCREMENT</keyword>
|
||||
<keyword>INITIALLY</keyword>
|
||||
<keyword>INSTANCE</keyword>
|
||||
<keyword>INSTANTIABLE</keyword>
|
||||
<keyword>INTERSECTION</keyword>
|
||||
<keyword>INVOKER</keyword>
|
||||
<keyword>ISOLATION</keyword>
|
||||
<keyword>K</keyword>
|
||||
<keyword>KEY_MEMBER</keyword>
|
||||
<keyword>KEY_TYPE</keyword>
|
||||
<keyword>KEY</keyword>
|
||||
<keyword>LAST</keyword>
|
||||
<keyword>LENGTH</keyword>
|
||||
<keyword>LEVEL</keyword>
|
||||
<keyword>LN</keyword>
|
||||
<keyword>LOCATOR</keyword>
|
||||
<keyword>LOWER</keyword>
|
||||
<keyword>M</keyword>
|
||||
<keyword>MAP</keyword>
|
||||
<keyword>MATCHED</keyword>
|
||||
<keyword>MAX</keyword>
|
||||
<keyword>MAXVALUE</keyword>
|
||||
<keyword>MESSAGE_LENGTH</keyword>
|
||||
<keyword>MESSAGE_OCTET_LENGTH</keyword>
|
||||
<keyword>MESSAGE_TEXT</keyword>
|
||||
<keyword>MIN</keyword>
|
||||
<keyword>MINVALUE</keyword>
|
||||
<keyword>MOD</keyword>
|
||||
<keyword>MORE</keyword>
|
||||
<keyword>MUMPS</keyword>
|
||||
<keyword>NAME</keyword>
|
||||
<keyword>NAMES</keyword>
|
||||
<keyword>NESTING</keyword>
|
||||
<keyword>NEXT</keyword>
|
||||
<keyword>NORMALIZE</keyword>
|
||||
<keyword>NORMALIZED</keyword>
|
||||
<keyword>NULLABLE</keyword>
|
||||
<keyword>NULLIF</keyword>
|
||||
<keyword>NULLS</keyword>
|
||||
<keyword>NUMBER</keyword>
|
||||
<keyword>OBJECT</keyword>
|
||||
<keyword>OCTET_LENGTH</keyword>
|
||||
<keyword>OCTETS</keyword>
|
||||
<keyword>OPTION</keyword>
|
||||
<keyword>OPTIONS</keyword>
|
||||
<keyword>ORDERING</keyword>
|
||||
<keyword>ORDINALITY</keyword>
|
||||
<keyword>OTHERS</keyword>
|
||||
<keyword>OVERLAY</keyword>
|
||||
<keyword>OVERRIDING</keyword>
|
||||
<keyword>PAD</keyword>
|
||||
<keyword>PARAMETER_MODE</keyword>
|
||||
<keyword>PARAMETER_NAME</keyword>
|
||||
<keyword>PARAMETER_ORDINAL_POSITION</keyword>
|
||||
<keyword>PARAMETER_SPECIFIC_CATALOG</keyword>
|
||||
<keyword>PARAMETER_SPECIFIC_NAME</keyword>
|
||||
<keyword>PARAMETER_SPECIFIC_SCHEMA</keyword>
|
||||
<keyword>PARTIAL</keyword>
|
||||
<keyword>PASCAL</keyword>
|
||||
<keyword>PATH</keyword>
|
||||
<keyword>PERCENT_RANK</keyword>
|
||||
<keyword>PERCENTILE_CONT</keyword>
|
||||
<keyword>PERCENTILE_DISC</keyword>
|
||||
<keyword>PLACING</keyword>
|
||||
<keyword>PLI</keyword>
|
||||
<keyword>POSITION</keyword>
|
||||
<keyword>POWER</keyword>
|
||||
<keyword>PRECEDING</keyword>
|
||||
<keyword>PRESERVE</keyword>
|
||||
<keyword>PRIOR</keyword>
|
||||
<keyword>PRIVILEGES</keyword>
|
||||
<keyword>PUBLIC</keyword>
|
||||
<keyword>RANK</keyword>
|
||||
<keyword>READ</keyword>
|
||||
<keyword>RELATIVE</keyword>
|
||||
<keyword>REPEATABLE</keyword>
|
||||
<keyword>RESTART</keyword>
|
||||
<keyword>RETURNED_CARDINALITY</keyword>
|
||||
<keyword>RETURNED_LENGTH</keyword>
|
||||
<keyword>RETURNED_OCTET_LENGTH</keyword>
|
||||
<keyword>RETURNED_SQLSTATE</keyword>
|
||||
<keyword>ROLE</keyword>
|
||||
<keyword>ROUTINE_CATALOG</keyword>
|
||||
<keyword>ROUTINE_NAME</keyword>
|
||||
<keyword>ROUTINE_SCHEMA</keyword>
|
||||
<keyword>ROUTINE</keyword>
|
||||
<keyword>ROW_COUNT</keyword>
|
||||
<keyword>ROW_NUMBER</keyword>
|
||||
<keyword>SCALE</keyword>
|
||||
<keyword>SCHEMA_NAME</keyword>
|
||||
<keyword>SCHEMA</keyword>
|
||||
<keyword>SCOPE_CATALOG</keyword>
|
||||
<keyword>SCOPE_NAME</keyword>
|
||||
<keyword>SCOPE_SCHEMA</keyword>
|
||||
<keyword>SECTION</keyword>
|
||||
<keyword>SECURITY</keyword>
|
||||
<keyword>SELF</keyword>
|
||||
<keyword>SEQUENCE</keyword>
|
||||
<keyword>SERIALIZABLE</keyword>
|
||||
<keyword>SERVER_NAME</keyword>
|
||||
<keyword>SESSION</keyword>
|
||||
<keyword>SETS</keyword>
|
||||
<keyword>SIMPLE</keyword>
|
||||
<keyword>SIZE</keyword>
|
||||
<keyword>SOURCE</keyword>
|
||||
<keyword>SPACE</keyword>
|
||||
<keyword>SPECIFIC_NAME</keyword>
|
||||
<keyword>SQRT</keyword>
|
||||
<keyword>STATE</keyword>
|
||||
<keyword>STATEMENT</keyword>
|
||||
<keyword>STDDEV_POP</keyword>
|
||||
<keyword>STDDEV_SAMP</keyword>
|
||||
<keyword>STRUCTURE</keyword>
|
||||
<keyword>STYLE</keyword>
|
||||
<keyword>SUBCLASS_ORIGIN</keyword>
|
||||
<keyword>SUBSTRING</keyword>
|
||||
<keyword>SUM</keyword>
|
||||
<keyword>TABLE_NAME</keyword>
|
||||
<keyword>TABLESAMPLE</keyword>
|
||||
<keyword>TEMPORARY</keyword>
|
||||
<keyword>TIES</keyword>
|
||||
<keyword>TOP_LEVEL_COUNT</keyword>
|
||||
<keyword>TRANSACTION_ACTIVE</keyword>
|
||||
<keyword>TRANSACTION</keyword>
|
||||
<keyword>TRANSACTIONS_COMMITTED</keyword>
|
||||
<keyword>TRANSACTIONS_ROLLED_BACK</keyword>
|
||||
<keyword>TRANSFORM</keyword>
|
||||
<keyword>TRANSFORMS</keyword>
|
||||
<keyword>TRANSLATE</keyword>
|
||||
<keyword>TRIGGER_CATALOG</keyword>
|
||||
<keyword>TRIGGER_NAME</keyword>
|
||||
<keyword>TRIGGER_SCHEMA</keyword>
|
||||
<keyword>TRIM</keyword>
|
||||
<keyword>TYPE</keyword>
|
||||
<keyword>UNBOUNDED</keyword>
|
||||
<keyword>UNCOMMITTED</keyword>
|
||||
<keyword>UNDER</keyword>
|
||||
<keyword>UNNAMED</keyword>
|
||||
<keyword>USAGE</keyword>
|
||||
<keyword>USER_DEFINED_TYPE_CATALOG</keyword>
|
||||
<keyword>USER_DEFINED_TYPE_CODE</keyword>
|
||||
<keyword>USER_DEFINED_TYPE_NAME</keyword>
|
||||
<keyword>USER_DEFINED_TYPE_SCHEMA</keyword>
|
||||
<keyword>VIEW</keyword>
|
||||
<keyword>WORK</keyword>
|
||||
<keyword>WRITE</keyword>
|
||||
<keyword>ZONE</keyword>
|
||||
<!-- non reserved -->
|
||||
<keyword>ADD</keyword>
|
||||
<keyword>ALL</keyword>
|
||||
<keyword>ALLOCATE</keyword>
|
||||
<keyword>ALTER</keyword>
|
||||
<keyword>AND</keyword>
|
||||
<keyword>ANY</keyword>
|
||||
<keyword>ARE</keyword>
|
||||
<keyword>ARRAY</keyword>
|
||||
<keyword>AS</keyword>
|
||||
<keyword>ASENSITIVE</keyword>
|
||||
<keyword>ASYMMETRIC</keyword>
|
||||
<keyword>AT</keyword>
|
||||
<keyword>ATOMIC</keyword>
|
||||
<keyword>AUTHORIZATION</keyword>
|
||||
<keyword>BEGIN</keyword>
|
||||
<keyword>BETWEEN</keyword>
|
||||
<keyword>BIGINT</keyword>
|
||||
<keyword>BINARY</keyword>
|
||||
<keyword>BLOB</keyword>
|
||||
<keyword>BOOLEAN</keyword>
|
||||
<keyword>BOTH</keyword>
|
||||
<keyword>BY</keyword>
|
||||
<keyword>CALL</keyword>
|
||||
<keyword>CALLED</keyword>
|
||||
<keyword>CASCADED</keyword>
|
||||
<keyword>CASE</keyword>
|
||||
<keyword>CAST</keyword>
|
||||
<keyword>CHAR</keyword>
|
||||
<keyword>CHARACTER</keyword>
|
||||
<keyword>CHECK</keyword>
|
||||
<keyword>CLOB</keyword>
|
||||
<keyword>CLOSE</keyword>
|
||||
<keyword>COLLATE</keyword>
|
||||
<keyword>COLUMN</keyword>
|
||||
<keyword>COMMIT</keyword>
|
||||
<keyword>CONNECT</keyword>
|
||||
<keyword>CONSTRAINT</keyword>
|
||||
<keyword>CONTINUE</keyword>
|
||||
<keyword>CORRESPONDING</keyword>
|
||||
<keyword>CREATE</keyword>
|
||||
<keyword>CROSS</keyword>
|
||||
<keyword>CUBE</keyword>
|
||||
<keyword>CURRENT_DATE</keyword>
|
||||
<keyword>CURRENT_DEFAULT_TRANSFORM_GROUP</keyword>
|
||||
<keyword>CURRENT_PATH</keyword>
|
||||
<keyword>CURRENT_ROLE</keyword>
|
||||
<keyword>CURRENT_TIME</keyword>
|
||||
<keyword>CURRENT_TIMESTAMP</keyword>
|
||||
<keyword>CURRENT_TRANSFORM_GROUP_FOR_TYPE</keyword>
|
||||
<keyword>CURRENT_USER</keyword>
|
||||
<keyword>CURRENT</keyword>
|
||||
<keyword>CURSOR</keyword>
|
||||
<keyword>CYCLE</keyword>
|
||||
<keyword>DATE</keyword>
|
||||
<keyword>DAY</keyword>
|
||||
<keyword>DEALLOCATE</keyword>
|
||||
<keyword>DEC</keyword>
|
||||
<keyword>DECIMAL</keyword>
|
||||
<keyword>DECLARE</keyword>
|
||||
<keyword>DEFAULT</keyword>
|
||||
<keyword>DELETE</keyword>
|
||||
<keyword>DEREF</keyword>
|
||||
<keyword>DESCRIBE</keyword>
|
||||
<keyword>DETERMINISTIC</keyword>
|
||||
<keyword>DISCONNECT</keyword>
|
||||
<keyword>DISTINCT</keyword>
|
||||
<keyword>DOUBLE</keyword>
|
||||
<keyword>DROP</keyword>
|
||||
<keyword>DYNAMIC</keyword>
|
||||
<keyword>EACH</keyword>
|
||||
<keyword>ELEMENT</keyword>
|
||||
<keyword>ELSE</keyword>
|
||||
<keyword>END</keyword>
|
||||
<keyword>END-EXEC</keyword>
|
||||
<keyword>ESCAPE</keyword>
|
||||
<keyword>EXCEPT</keyword>
|
||||
<keyword>EXEC</keyword>
|
||||
<keyword>EXECUTE</keyword>
|
||||
<keyword>EXISTS</keyword>
|
||||
<keyword>EXTERNAL</keyword>
|
||||
<keyword>FALSE</keyword>
|
||||
<keyword>FETCH</keyword>
|
||||
<keyword>FILTER</keyword>
|
||||
<keyword>FLOAT</keyword>
|
||||
<keyword>FOR</keyword>
|
||||
<keyword>FOREIGN</keyword>
|
||||
<keyword>FREE</keyword>
|
||||
<keyword>FROM</keyword>
|
||||
<keyword>FULL</keyword>
|
||||
<keyword>FUNCTION</keyword>
|
||||
<keyword>GET</keyword>
|
||||
<keyword>GLOBAL</keyword>
|
||||
<keyword>GRANT</keyword>
|
||||
<keyword>GROUP</keyword>
|
||||
<keyword>GROUPING</keyword>
|
||||
<keyword>HAVING</keyword>
|
||||
<keyword>HOLD</keyword>
|
||||
<keyword>HOUR</keyword>
|
||||
<keyword>IDENTITY</keyword>
|
||||
<keyword>IMMEDIATE</keyword>
|
||||
<keyword>IN</keyword>
|
||||
<keyword>INDICATOR</keyword>
|
||||
<keyword>INNER</keyword>
|
||||
<keyword>INOUT</keyword>
|
||||
<keyword>INPUT</keyword>
|
||||
<keyword>INSENSITIVE</keyword>
|
||||
<keyword>INSERT</keyword>
|
||||
<keyword>INT</keyword>
|
||||
<keyword>INTEGER</keyword>
|
||||
<keyword>INTERSECT</keyword>
|
||||
<keyword>INTERVAL</keyword>
|
||||
<keyword>INTO</keyword>
|
||||
<keyword>IS</keyword>
|
||||
<keyword>ISOLATION</keyword>
|
||||
<keyword>JOIN</keyword>
|
||||
<keyword>LANGUAGE</keyword>
|
||||
<keyword>LARGE</keyword>
|
||||
<keyword>LATERAL</keyword>
|
||||
<keyword>LEADING</keyword>
|
||||
<keyword>LEFT</keyword>
|
||||
<keyword>LIKE</keyword>
|
||||
<keyword>LOCAL</keyword>
|
||||
<keyword>LOCALTIME</keyword>
|
||||
<keyword>LOCALTIMESTAMP</keyword>
|
||||
<keyword>MATCH</keyword>
|
||||
<keyword>MEMBER</keyword>
|
||||
<keyword>MERGE</keyword>
|
||||
<keyword>METHOD</keyword>
|
||||
<keyword>MINUTE</keyword>
|
||||
<keyword>MODIFIES</keyword>
|
||||
<keyword>MODULE</keyword>
|
||||
<keyword>MONTH</keyword>
|
||||
<keyword>MULTISET</keyword>
|
||||
<keyword>NATIONAL</keyword>
|
||||
<keyword>NATURAL</keyword>
|
||||
<keyword>NCHAR</keyword>
|
||||
<keyword>NCLOB</keyword>
|
||||
<keyword>NEW</keyword>
|
||||
<keyword>NO</keyword>
|
||||
<keyword>NONE</keyword>
|
||||
<keyword>NOT</keyword>
|
||||
<keyword>NULL</keyword>
|
||||
<keyword>NUMERIC</keyword>
|
||||
<keyword>OF</keyword>
|
||||
<keyword>OLD</keyword>
|
||||
<keyword>ON</keyword>
|
||||
<keyword>ONLY</keyword>
|
||||
<keyword>OPEN</keyword>
|
||||
<keyword>OR</keyword>
|
||||
<keyword>ORDER</keyword>
|
||||
<keyword>OUT</keyword>
|
||||
<keyword>OUTER</keyword>
|
||||
<keyword>OUTPUT</keyword>
|
||||
<keyword>OVER</keyword>
|
||||
<keyword>OVERLAPS</keyword>
|
||||
<keyword>PARAMETER</keyword>
|
||||
<keyword>PARTITION</keyword>
|
||||
<keyword>PRECISION</keyword>
|
||||
<keyword>PREPARE</keyword>
|
||||
<keyword>PRIMARY</keyword>
|
||||
<keyword>PROCEDURE</keyword>
|
||||
<keyword>RANGE</keyword>
|
||||
<keyword>READS</keyword>
|
||||
<keyword>REAL</keyword>
|
||||
<keyword>RECURSIVE</keyword>
|
||||
<keyword>REF</keyword>
|
||||
<keyword>REFERENCES</keyword>
|
||||
<keyword>REFERENCING</keyword>
|
||||
<keyword>REGR_AVGX</keyword>
|
||||
<keyword>REGR_AVGY</keyword>
|
||||
<keyword>REGR_COUNT</keyword>
|
||||
<keyword>REGR_INTERCEPT</keyword>
|
||||
<keyword>REGR_R2</keyword>
|
||||
<keyword>REGR_SLOPE</keyword>
|
||||
<keyword>REGR_SXX</keyword>
|
||||
<keyword>REGR_SXY</keyword>
|
||||
<keyword>REGR_SYY</keyword>
|
||||
<keyword>RELEASE</keyword>
|
||||
<keyword>RESULT</keyword>
|
||||
<keyword>RETURN</keyword>
|
||||
<keyword>RETURNS</keyword>
|
||||
<keyword>REVOKE</keyword>
|
||||
<keyword>RIGHT</keyword>
|
||||
<keyword>ROLLBACK</keyword>
|
||||
<keyword>ROLLUP</keyword>
|
||||
<keyword>ROW</keyword>
|
||||
<keyword>ROWS</keyword>
|
||||
<keyword>SAVEPOINT</keyword>
|
||||
<keyword>SCROLL</keyword>
|
||||
<keyword>SEARCH</keyword>
|
||||
<keyword>SECOND</keyword>
|
||||
<keyword>SELECT</keyword>
|
||||
<keyword>SENSITIVE</keyword>
|
||||
<keyword>SESSION_USER</keyword>
|
||||
<keyword>SET</keyword>
|
||||
<keyword>SIMILAR</keyword>
|
||||
<keyword>SMALLINT</keyword>
|
||||
<keyword>SOME</keyword>
|
||||
<keyword>SPECIFIC</keyword>
|
||||
<keyword>SPECIFICTYPE</keyword>
|
||||
<keyword>SQL</keyword>
|
||||
<keyword>SQLEXCEPTION</keyword>
|
||||
<keyword>SQLSTATE</keyword>
|
||||
<keyword>SQLWARNING</keyword>
|
||||
<keyword>START</keyword>
|
||||
<keyword>STATIC</keyword>
|
||||
<keyword>SUBMULTISET</keyword>
|
||||
<keyword>SYMMETRIC</keyword>
|
||||
<keyword>SYSTEM_USER</keyword>
|
||||
<keyword>SYSTEM</keyword>
|
||||
<keyword>TABLE</keyword>
|
||||
<keyword>THEN</keyword>
|
||||
<keyword>TIME</keyword>
|
||||
<keyword>TIMESTAMP</keyword>
|
||||
<keyword>TIMEZONE_HOUR</keyword>
|
||||
<keyword>TIMEZONE_MINUTE</keyword>
|
||||
<keyword>TO</keyword>
|
||||
<keyword>TRAILING</keyword>
|
||||
<keyword>TRANSLATION</keyword>
|
||||
<keyword>TREAT</keyword>
|
||||
<keyword>TRIGGER</keyword>
|
||||
<keyword>TRUE</keyword>
|
||||
<keyword>UESCAPE</keyword>
|
||||
<keyword>UNION</keyword>
|
||||
<keyword>UNIQUE</keyword>
|
||||
<keyword>UNKNOWN</keyword>
|
||||
<keyword>UNNEST</keyword>
|
||||
<keyword>UPDATE</keyword>
|
||||
<keyword>UPPER</keyword>
|
||||
<keyword>USER</keyword>
|
||||
<keyword>USING</keyword>
|
||||
<keyword>VALUE</keyword>
|
||||
<keyword>VALUES</keyword>
|
||||
<keyword>VAR_POP</keyword>
|
||||
<keyword>VAR_SAMP</keyword>
|
||||
<keyword>VARCHAR</keyword>
|
||||
<keyword>VARYING</keyword>
|
||||
<keyword>WHEN</keyword>
|
||||
<keyword>WHENEVER</keyword>
|
||||
<keyword>WHERE</keyword>
|
||||
<keyword>WIDTH_BUCKET</keyword>
|
||||
<keyword>WINDOW</keyword>
|
||||
<keyword>WITH</keyword>
|
||||
<keyword>WITHIN</keyword>
|
||||
<keyword>WITHOUT</keyword>
|
||||
<keyword>YEAR</keyword>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<highlighters>
|
||||
<highlighter type="oneline-comment">#</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>"</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="string">
|
||||
<string>'</string>
|
||||
<escape>\</escape>
|
||||
</highlighter>
|
||||
<highlighter type="annotation">
|
||||
<start>@</start>
|
||||
<valueStart>(</valueStart>
|
||||
<valueEnd>)</valueEnd>
|
||||
</highlighter>
|
||||
<highlighter type="number">
|
||||
<point>.</point>
|
||||
<exponent>e</exponent>
|
||||
<suffix>f</suffix>
|
||||
<suffix>d</suffix>
|
||||
<suffix>l</suffix>
|
||||
<ignoreCase/>
|
||||
</highlighter>
|
||||
<highlighter type="keywords">
|
||||
<keyword>true</keyword>
|
||||
<keyword>false</keyword>
|
||||
</highlighter>
|
||||
<highlighter type="word">
|
||||
<word>{</word>
|
||||
<word>}</word>
|
||||
<word>,</word>
|
||||
<word>[</word>
|
||||
<word>]</word>
|
||||
<style>keyword</style>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(---)$</pattern>
|
||||
<style>comment</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
<highlighter type="regex">
|
||||
<pattern>^(.+?)(?==|:)</pattern>
|
||||
<style>attribute</style>
|
||||
<flags>MULTILINE</flags>
|
||||
</highlighter>
|
||||
</highlighters>
|
||||
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
base_dir = File.join(File.dirname(__FILE__),'../../..')
|
||||
src_dir = File.join(base_dir, "/src/main/asciidoc")
|
||||
require 'asciidoctor'
|
||||
require 'optparse'
|
||||
|
||||
options = {}
|
||||
file = "#{src_dir}/README.adoc"
|
||||
|
||||
OptionParser.new do |o|
|
||||
o.on('-o OUTPUT_FILE', 'Output file (default is stdout)') { |file| options[:to_file] = file unless file=='-' }
|
||||
o.on('-h', '--help') { puts o; exit }
|
||||
o.parse!
|
||||
end
|
||||
|
||||
file = ARGV[0] if ARGV.length>0
|
||||
|
||||
# Copied from https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/scripts/asciidoc-coalescer.rb
|
||||
doc = Asciidoctor.load_file file, safe: :unsafe, header_only: true, attributes: options[:attributes]
|
||||
header_attr_names = (doc.instance_variable_get :@attributes_modified).to_a
|
||||
header_attr_names.each {|k| doc.attributes[%(#{k}!)] = '' unless doc.attr? k }
|
||||
attrs = doc.attributes
|
||||
attrs['allow-uri-read'] = true
|
||||
puts attrs
|
||||
|
||||
out = "// Do not edit this file (e.g. go instead to src/main/asciidoc)\n\n"
|
||||
doc = Asciidoctor.load_file file, safe: :unsafe, parse: false, attributes: attrs
|
||||
out << doc.reader.read
|
||||
|
||||
unless options[:to_file]
|
||||
puts out
|
||||
else
|
||||
File.open(options[:to_file],'w+') do |file|
|
||||
file.write(out)
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1 @@
|
||||
preparing for tests
|
||||
@@ -0,0 +1 @@
|
||||
ref: refs/heads/1.3.x
|
||||
@@ -0,0 +1 @@
|
||||
f5a37ebb5050288b8d480e62db24aa7a6f76868c
|
||||
@@ -0,0 +1,16 @@
|
||||
[core]
|
||||
repositoryformatversion = 0
|
||||
filemode = true
|
||||
bare = false
|
||||
logallrefupdates = true
|
||||
ignorecase = true
|
||||
precomposeunicode = true
|
||||
[remote "origin"]
|
||||
url = git@github.com:spring-cloud/spring-cloud-build.git
|
||||
fetch = +refs/heads/*:refs/remotes/origin/*
|
||||
[branch "master"]
|
||||
remote = origin
|
||||
merge = refs/heads/master
|
||||
[branch "1.3.x"]
|
||||
remote = origin
|
||||
merge = refs/heads/1.3.x
|
||||
@@ -0,0 +1 @@
|
||||
Unnamed repository; edit this file 'description' to name the repository.
|
||||
@@ -0,0 +1,6 @@
|
||||
0000000000000000000000000000000000000000 a4d3ca059d1872050823d6518a4e5fc0f7ca4352 Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562931 +0100 clone: from git@github.com:spring-cloud/spring-cloud-build.git
|
||||
a4d3ca059d1872050823d6518a4e5fc0f7ca4352 2578cdbfa95c501e489fd1dcd55dfdc0fdd4e6d2 Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562937 +0100 checkout: moving from master to 1.3.x
|
||||
2578cdbfa95c501e489fd1dcd55dfdc0fdd4e6d2 f5a37ebb5050288b8d480e62db24aa7a6f76868c Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562973 +0100 reset: moving to f5a37eb
|
||||
f5a37ebb5050288b8d480e62db24aa7a6f76868c f5a37ebb5050288b8d480e62db24aa7a6f76868c Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562977 +0100 reset: moving to HEAD
|
||||
f5a37ebb5050288b8d480e62db24aa7a6f76868c f5a37ebb5050288b8d480e62db24aa7a6f76868c Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562980 +0100 reset: moving to f5a37eb
|
||||
f5a37ebb5050288b8d480e62db24aa7a6f76868c d4d5865c142f92aebb5dd1a7c9b745395e65873a Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517564158 +0100 commit: preparing for tests
|
||||
@@ -0,0 +1,3 @@
|
||||
0000000000000000000000000000000000000000 2578cdbfa95c501e489fd1dcd55dfdc0fdd4e6d2 Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562937 +0100 branch: Created from refs/remotes/origin/1.3.x
|
||||
2578cdbfa95c501e489fd1dcd55dfdc0fdd4e6d2 f5a37ebb5050288b8d480e62db24aa7a6f76868c Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562973 +0100 reset: moving to f5a37eb
|
||||
f5a37ebb5050288b8d480e62db24aa7a6f76868c d4d5865c142f92aebb5dd1a7c9b745395e65873a Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517564158 +0100 commit: preparing for tests
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 a4d3ca059d1872050823d6518a4e5fc0f7ca4352 Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562931 +0100 clone: from git@github.com:spring-cloud/spring-cloud-build.git
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 a4d3ca059d1872050823d6518a4e5fc0f7ca4352 Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562931 +0100 clone: from git@github.com:spring-cloud/spring-cloud-build.git
|
||||
@@ -0,0 +1 @@
|
||||
0000000000000000000000000000000000000000 6c440242fd0d99ea81d901dfce0c9feef817afa3 Marcin Grzejszczak <mgrzejszczak@pivotal.io> 1517562977 +0100 WIP on 1.3.x: f5a37eb Update boot to 1.5.9.RELEASE
|
||||
@@ -0,0 +1,2 @@
|
||||
x<01><><EFBFBD>J<EFBFBD>@D]<5D>+z/<2F>y<EFBFBD><79><EFBFBD><EFBFBD>"<22><> <20><><EFBFBD><EFBFBD><EFBFBD>h<EFBFBD>d.q<14><>{.~<7E>ˢU<1C><><5<><35><1F>U9Ϟ<14>RX!F<>ζ<>1$G<>ɹ<EFBFBD><C9B9>h<EFBFBD><68><EFBFBD><EFBFBD>ɢ<EFBFBD><C9A2><EFBFBD>W&<26><1C><>J<EFBFBD>)<29><><EFBFBD>F1D><3E><>j<EFBFBD><6A><EFBFBD><EFBFBD>+c<><63>A<EFBFBD><41>U<>6<EFBFBD>bR<62>(ڱt<DAB1>ў<EFBFBD>
|
||||
7<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><1B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>w<EFBFBD>gm<67><6D>O<EFBFBD><0C><><EFBFBD><EFBFBD>I<EFBFBD>p<EFBFBD><70>R<1D><>5<EFBFBD><35>N<EFBFBD>xuu<01><><EFBFBD><EFBFBD><EFBFBD>
|
||||