-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathHOW_TO_RELEASE.txt
89 lines (77 loc) · 4.3 KB
/
HOW_TO_RELEASE.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
====
Copyright (C) 2014 Politecnico di Milano ([email protected])
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
http://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.
====
# RELEASE
# REMEMBER to change maven configuration to force it to use java 7. Example in OS X:
echo 'export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home' > ~/.mavenrc
# From the develop branch
git checkout develop
# do (without any local change):
mvn clean release:prepare -DdryRun=true
mvn release:clean release:prepare release:perform
# Add artifacts to the github release until u fix github release plugin using https://github.com/aktau/github-release
export GITHUB_TOKEN=$(cat ~/.github/ReleaseT4C.token)
export GITHUB_USER=deib-polimi
export GITHUB_REPO=tower4clouds
export LATEST_TAG=$(git describe --abbrev=0)
export LATEST_VERSION=$(echo $LATEST_TAG | sed s/v//)
github-release release --tag $LATEST_TAG
github-release upload \
--tag $LATEST_TAG \
--name manager-server-${LATEST_VERSION}.tar.gz \
--file manager/manager-server/target/manager-server-${LATEST_VERSION}.tar.gz
github-release upload \
--tag $LATEST_TAG \
--name data-analyzer-${LATEST_VERSION}.tar.gz \
--file data-analyzer/target/data-analyzer-${LATEST_VERSION}.tar.gz
github-release upload \
--tag $LATEST_TAG \
--name rdf-history-db-main-${LATEST_VERSION}.tar.gz \
--file observers/rdf-history-db/rdf-history-db-main/target/rdf-history-db-main-${LATEST_VERSION}.tar.gz
github-release upload \
--tag $LATEST_TAG \
--name rules-${LATEST_VERSION}-jar-with-dependencies.jar \
--file rules/target/rules-${LATEST_VERSION}-jar-with-dependencies.jar
github-release upload \
--tag $LATEST_TAG \
--name flexiant-nodes-dc-${LATEST_VERSION}-jar-with-dependencies.jar \
--file data-collectors/flexiant-nodes-dc/target/flexiant-nodes-dc-${LATEST_VERSION}-jar-with-dependencies.jar
github-release upload \
--tag $LATEST_TAG \
--name data2stdout-${LATEST_VERSION}.tar.gz \
--file observers/data2stdout/target/data2stdout-${LATEST_VERSION}.tar.gz
# Release on modaclouds ftp
ftp -n <<EOF
open ftp.modaclouds.eu
user ftp.polimi $(cat ~/.ftp/[email protected])
mkdir /public/distributions/t4c-manager/${LATEST_VERSION}
mkdir /public/distributions/t4c-data-analyzer/${LATEST_VERSION}
mkdir /public/distributions/t4c-rdf-history-db/${LATEST_VERSION}
put manager/manager-server/target/manager-server-${LATEST_VERSION}-jar-with-dependencies.jar /public/distributions/t4c-manager/${LATEST_VERSION}/service.jar
put manager/manager-server/scripts/start-script-4-mosaic /public/distributions/t4c-manager/${LATEST_VERSION}/service-run.bash
put data-analyzer/target/data-analyzer-${LATEST_VERSION}-jar-with-dependencies.jar /public/distributions/t4c-data-analyzer/${LATEST_VERSION}/service.jar
put data-analyzer/scripts/start-script-4-mosaic /public/distributions/t4c-data-analyzer/${LATEST_VERSION}/service-run.bash
put observers/rdf-history-db/rdf-history-db-main/target/rdf-history-db-main-${LATEST_VERSION}-jar-with-dependencies.jar /public/distributions/t4c-rdf-history-db/${LATEST_VERSION}/service.jar
put observers/rdf-history-db/rdf-history-db-main/scripts/start-script-4-mosaic /public/distributions/t4c-rdf-history-db/${LATEST_VERSION}/service-run.bash
EOF
# Merge the new created tag with the master so that the master has the most recent stable version
git checkout master
git merge $LATEST_TAG --no-edit
git push origin master
git checkout develop
# RELEASE WEBSITE (see the doc: http://couscous.io)
# "couscous preview" to see a preview
couscous deploy
# IF SOMETHING GOES WRONG (WARNING: ALL RECENT COMMITS IN THE CURRENT BRANCH WILL BE LOST, ALSO ON THE REMOTE! DO IT ONLY IF YOU ARE SURE OF WHAT YOU ARE DOING)
# BE CAREFUL TO THE BRANCH YOU ARE ON
# "git reset --hard <id of the commit you want to reset to>"
# "git push origin <current branch name> --force"