Skip to content

Commit

Permalink
Publishing to Github Releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Ilyin committed Feb 27, 2018
1 parent c5e23e0 commit 3af2e75
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
build/
out/
.idea/
.gradle/
*.iml
Expand Down
41 changes: 40 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ buildscript {
scalaPatchVersion = '12'
springBootVersion = '1.5.6.RELEASE'
tinkerpopVersion = '3.3.1'
tagPrefix = 'v'
}

repositories {
Expand All @@ -23,12 +24,43 @@ buildscript {
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.4.5'
classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.3'
classpath 'com.kncept.junit5.reporter:junit-reporter:1.0.2'
classpath 'co.riiid:gradle-github-plugin:0.4.2'
classpath 'pl.allegro.tech.build:axion-release-plugin:1.8.3'
}
}

apply plugin: 'pl.allegro.tech.build.axion-release'
apply plugin: 'co.riiid.gradle'

scmVersion {
tag {
prefix = tagPrefix
versionSeparator = ''
initialVersion = { config, position -> '0.9.0' }
}
localOnly = true
}

project.version = scmVersion.version

github {
owner 'opencypher'
repo 'cypher-for-gremlin'
token = project.findProperty('githubToken') ?: "undefined"
tagName "${tagPrefix}${project.version}"
name = "${project.version}"
body = ''
draft true
assets = [
"tinkerpop/cypher-gremlin-server-plugin/build/libs/cypher-gremlin-server-plugin-${project.version}-all.jar",
"tinkerpop/cypher-gremlin-console-plugin/build/libs/cypher-gremlin-console-plugin-${project.version}-all.jar",
"tinkerpop/cypher-gremlin-console-plugin/build/dist/cypher-gremlin-console-${tinkerpopVersion}.zip"
]
}

allprojects {
group 'org.opencypher.gremlin'
version '0.9.0-SNAPSHOT'
version scmVersion.version
}

task gitHooks(type: Copy) {
Expand Down Expand Up @@ -145,6 +177,13 @@ project(':tinkerpop:cypher-gremlin-console-plugin') {

compileOnly "org.apache.tinkerpop:gremlin-console:${tinkerpopVersion}"
}

task makeDist(type: Exec) {
commandLine 'make'
args = ["dist",
"PROJECT_VERSION=${project.version}",
"TINKERPOP_VERSION=${tinkerpopVersion}"]
}
}

project(':tinkerpop:cypher-gremlin-neo4j-driver') {
Expand Down
22 changes: 14 additions & 8 deletions tinkerpop/cypher-gremlin-console-plugin/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
.DEFAULT_GOAL := dist

PWD ?= $(shell pwd)
PWD = $(shell pwd)

PROJECT_VERSION ?= 0.9.0
TINKERPOP_VERSION ?= 3.3.1

PROJECT_VERSION = 1.0-SNAPSHOT
PROJECT = $(PWD)/../..
SUBPROJECT = $(PROJECT)/tinkerpop/cypher-gremlin-console-plugin
BUILD_JAR = build/libs/cypher-gremlin-console-plugin-$(PROJECT_VERSION)-all.jar
Expand All @@ -11,10 +13,11 @@ DIST_DIR = $(SUBPROJECT)/build/dist
INSTALL_DIR = $(SUBPROJECT)/build/install
INSTALL_PLUGIN = $(CONSOLE_DIR)/lib/cypher-gremlin-console-plugin-$(PROJECT_VERSION)-all.jar

TINKERPOP_VERSION = 3.3.1
CONSOLE = apache-tinkerpop-gremlin-console-$(TINKERPOP_VERSION)
CONSOLE_DIR = $(INSTALL_DIR)/$(CONSOLE)
CONSOLE_OUT = cypher-gremlin-console-$(TINKERPOP_VERSION)
CONSOLE_DIR = $(INSTALL_DIR)/$(CONSOLE_OUT)
CONSOLE_ZIP = build/tmp/$(CONSOLE).zip
CONSOLE_DIST = $(DIST_DIR)/$(CONSOLE_OUT).zip


$(INSTALL_PLUGIN): $(BUILD_JAR) $(CONSOLE_DIR)
Expand All @@ -27,14 +30,17 @@ $(CONSOLE_ZIP):
curl -o $(CONSOLE_ZIP) "http://www-eu.apache.org/dist/tinkerpop/$(TINKERPOP_VERSION)/$(CONSOLE)-bin.zip"

$(CONSOLE_DIR): $(CONSOLE_ZIP)
mkdir -p $(CONSOLE_DIR)
mkdir -p $(INSTALL_DIR)/$(CONSOLE)
unzip -q $(CONSOLE_ZIP) -d $(INSTALL_DIR)
mv $(INSTALL_DIR)/$(CONSOLE) $(CONSOLE_DIR)
find $(CONSOLE_DIR) -exec touch {} \;

.PHONY: dist
dist: $(INSTALL_PLUGIN)
$(CONSOLE_DIST): $(INSTALL_PLUGIN)
mkdir -p $(DIST_DIR)
cd $(INSTALL_DIR) && zip -qr $(DIST_DIR)/$(CONSOLE).zip $(CONSOLE)
cd $(INSTALL_DIR) && zip -qr $(CONSOLE_DIST) $(CONSOLE_OUT)

.PHONY: dist
dist: $(CONSOLE_DIST)

.PHONY: install
install: $(INSTALL_PLUGIN)
Expand Down

0 comments on commit 3af2e75

Please sign in to comment.