forked from openxc/openxc-android
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfabfile.py
More file actions
33 lines (26 loc) · 984 Bytes
/
fabfile.py
File metadata and controls
33 lines (26 loc) · 984 Bytes
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
#!/usr/bin/env python
import os
from fabric.api import *
from fabric.colors import green
env.root_dir = os.path.abspath(os.path.dirname(__file__))
env.release = "HEAD"
proxy = os.environ.get('http_proxy', None)
env.http_proxy = env.http_proxy_port = None
if proxy is not None:
env.http_proxy, env.http_proxy_port = proxy.rsplit(":")
@task
def release():
local("mvn release:clean")
local("mvn release:prepare")
local("mvn release:perform")
local("mvn package -pl enabler -am")
env.release = release_descriptor(env.root_dir)
# https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
print(green("Deployed to a staging repository at Sonatype - now go "
"to https://oss.sonatype.org, close the repository and release it."))
@task
def snapshot():
local("mvn clean deploy -pl openxc -am")
def release_descriptor(path):
with lcd(path):
return local('git describe HEAD', capture=True).rstrip("\n")