nixenvironment 0.0.61 → 0.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/nixenvironment +7 -6
- data/lib/nixenvironment/config.rb +0 -1
- data/lib/nixenvironment/version.rb +1 -1
- metadata +2 -4
- data/legacy/IncrementBuildNumber.py +0 -129
- data/legacy/RemoveTemporaryFiles.sh +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91e6fd2133f4777ef2281d4186dbe9aa4cb028a9
|
4
|
+
data.tar.gz: b9fc0243f4c04d90790d4ffd50c195a1c60e6473
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dd37cea07c3d993c5d2894277cad36243cc1067dbe71a817125aa0b22f9c464fc5e87eefbceba19944a73653a2214d6e0472f0ea182ca8d552c8453f298705b
|
7
|
+
data.tar.gz: 6ef482565151ed436601de5ccf5486536d60095c6e65c4f40e0b1242abfbb0eb8e402d8ae277a4ed70ecd5a5e2d5225a6ff40618ea904af3c516a7202d727db5
|
data/bin/nixenvironment
CHANGED
@@ -326,9 +326,7 @@ end
|
|
326
326
|
|
327
327
|
def working_copy_is_clean?
|
328
328
|
system("
|
329
|
-
|
330
|
-
|
331
|
-
source ${LAST_REVISION_FILE}
|
329
|
+
source \"_last_revision.sh\"
|
332
330
|
|
333
331
|
if [ ${WORKING_COPY_IS_CLEAN} -eq 1 ]; then
|
334
332
|
echo \"Working copy is clean. Continuing ...\"
|
@@ -640,9 +638,12 @@ def unity_deploy(unity_platform)
|
|
640
638
|
end
|
641
639
|
|
642
640
|
def clean
|
643
|
-
|
644
|
-
|
645
|
-
|
641
|
+
FileUtils.rm_f(Dir.glob('*.pyc'))
|
642
|
+
FileUtils.rm_f('last_revision.sh')
|
643
|
+
FileUtils.rm_f('last_build_vars.sh')
|
644
|
+
FileUtils.rm_f('coverage.xml')
|
645
|
+
FileUtils.rm_f('duplication.xml')
|
646
|
+
FileUtils.rm_rf('test-results/')
|
646
647
|
Xcodebuild.clean_all_targets
|
647
648
|
end
|
648
649
|
|
@@ -14,7 +14,6 @@ module Nixenvironment
|
|
14
14
|
SAVE_REVISION_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'SaveRevision.sh')
|
15
15
|
UNITY_BUILD_ANDROID_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'UnityBuildAndroid.py')
|
16
16
|
LOAD_BUILD_ENV_VARS_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'LoadBuildEnvVars.sh')
|
17
|
-
REMOVE_TEMPORARY_FILES_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'RemoveTemporaryFiles.sh')
|
18
17
|
CODE_COVERAGE_REPORT_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'GenerateCodeCoverageForXCTests.sh')
|
19
18
|
CODE_DUPLICATION_REPORT_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'GenerateCodeDuplicationReport.sh')
|
20
19
|
MAKE_TAG_SCRIPT_PATH = File.join(BUILD_SCRIPTS_PATH, 'MakeTag.sh')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nixenvironment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.62
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-09-
|
12
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cocoapods
|
@@ -204,10 +204,8 @@ files:
|
|
204
204
|
- legacy/DetectSCM.sh
|
205
205
|
- legacy/GenerateCodeCoverageForXCTests.sh
|
206
206
|
- legacy/GenerateCodeDuplicationReport.sh
|
207
|
-
- legacy/IncrementBuildNumber.py
|
208
207
|
- legacy/LoadBuildEnvVars.sh
|
209
208
|
- legacy/MakeTag.sh
|
210
|
-
- legacy/RemoveTemporaryFiles.sh
|
211
209
|
- legacy/SaveRevision.sh
|
212
210
|
- legacy/UnityBuildAndroid.py
|
213
211
|
- legacy/UnityBuildAutomationScripts/CommandLineReader.cs
|
@@ -1,129 +0,0 @@
|
|
1
|
-
#!/usr/bin/python
|
2
|
-
|
3
|
-
# Created by Yuri Govorushchenko on 11/29/10.
|
4
|
-
# Copyright 2010 nix. All rights reserved.
|
5
|
-
|
6
|
-
import os
|
7
|
-
import sys
|
8
|
-
import optparse
|
9
|
-
import plistlib
|
10
|
-
import thread
|
11
|
-
from threading import Timer
|
12
|
-
from subprocess import Popen, PIPE
|
13
|
-
|
14
|
-
PLIST_BUILD_NUMBER_KEY = "CFBundleVersion"
|
15
|
-
DEFAULT_INCREMENT_STEP = 1
|
16
|
-
WAITING_TIME_FOR_REPOSITORY = 10.0
|
17
|
-
|
18
|
-
timer = None
|
19
|
-
|
20
|
-
def main():
|
21
|
-
parser = optparse.OptionParser(description='Script gets latest build number from repository, increments it and writes into local info plist file',
|
22
|
-
prog='IncrementBuildNumber')
|
23
|
-
|
24
|
-
parser.add_option("-f", "--plist", dest="plist_path", help="full path to project info plist file", metavar="PLIST")
|
25
|
-
parser.add_option("-u", "--username", dest="username", help="authorization username", metavar="USERNAME")
|
26
|
-
parser.add_option("-p", "--password", dest="password", help="authorization password", metavar="PASSWORD")
|
27
|
-
parser.add_option("-i", "--increment", dest="increment_step", help="increment step. Should be more than 0. Default value is 1.(optional)", metavar="INCREMENT_NUMBER")
|
28
|
-
|
29
|
-
(options, args) = parser.parse_args()
|
30
|
-
|
31
|
-
if options.plist_path is None or options.username is None or options.password is None:
|
32
|
-
parser.error('All arguments must be specified. Use option -h to see the usage.')
|
33
|
-
|
34
|
-
increment_step = DEFAULT_INCREMENT_STEP
|
35
|
-
|
36
|
-
if options.increment_step is not None:
|
37
|
-
parsed_increment_step = int(options.increment_step)
|
38
|
-
if parsed_increment_step > 1:
|
39
|
-
increment_step = parsed_increment_step
|
40
|
-
|
41
|
-
plist_path = options.plist_path
|
42
|
-
username = options.username
|
43
|
-
password = options.password
|
44
|
-
|
45
|
-
if not os.path.isfile(plist_path):
|
46
|
-
print_error('file does not exist: %s' % plist_path)
|
47
|
-
return 1
|
48
|
-
|
49
|
-
try:
|
50
|
-
head_build_number = get_head_build_number(plist_path, username, password)
|
51
|
-
write_build_number(head_build_number, plist_path)
|
52
|
-
update_file(plist_path, username, password)
|
53
|
-
write_build_number(head_build_number+increment_step, plist_path)
|
54
|
-
except Exception, e:
|
55
|
-
timer.cancel()
|
56
|
-
print_warning("Couldn't get current app build version from repository. App build version is not increased. (exception: %s)" % e)
|
57
|
-
|
58
|
-
return 0
|
59
|
-
|
60
|
-
def print_error(error_message):
|
61
|
-
""" Prints error message with predefined prefix.
|
62
|
-
|
63
|
-
Args:
|
64
|
-
error_message: Error message.
|
65
|
-
"""
|
66
|
-
|
67
|
-
XCODE_ERROR_PREFIX = 'error: ' # log messages with such prefix are highlighted in XCode as errors
|
68
|
-
|
69
|
-
print('%s%s' % (XCODE_ERROR_PREFIX, error_message))
|
70
|
-
|
71
|
-
def print_warning(warning_message):
|
72
|
-
""" Prints warning message with predefined prefix.
|
73
|
-
|
74
|
-
Args:
|
75
|
-
warning_message: Warning message.
|
76
|
-
"""
|
77
|
-
|
78
|
-
XCODE_WARNING_PREFIX = 'warning: ' # log messages with such prefix are highlighted in XCode as warning
|
79
|
-
|
80
|
-
print('%s%s' % (XCODE_WARNING_PREFIX, warning_message))
|
81
|
-
|
82
|
-
def get_head_build_number(plist_path, username, password):
|
83
|
-
url = get_svn_url_for_path(plist_path)
|
84
|
-
head_build_number = get_build_number_from_svn_plist(url, username, password)
|
85
|
-
|
86
|
-
return head_build_number
|
87
|
-
|
88
|
-
def get_svn_url_for_path(plist_path):
|
89
|
-
svn_info = Popen(["svn", "info", plist_path], stdin=PIPE, stdout=PIPE)
|
90
|
-
output = svn_info.communicate()[0]
|
91
|
-
|
92
|
-
SVN_INFO_URL_PREFIX = "URL: "
|
93
|
-
|
94
|
-
for line in output.split("\n"):
|
95
|
-
if line.startswith(SVN_INFO_URL_PREFIX):
|
96
|
-
url = line[len(SVN_INFO_URL_PREFIX):]
|
97
|
-
return url
|
98
|
-
|
99
|
-
def get_build_number_from_svn_plist(url, username, password):
|
100
|
-
svn_get = Popen(["svn", "cat", url, "--username", username, "--password", password], stdin=PIPE, stdout=PIPE)
|
101
|
-
|
102
|
-
global timer
|
103
|
-
timer = Timer(WAITING_TIME_FOR_REPOSITORY, timeout_waiting_for_repository, [svn_get])
|
104
|
-
timer.start()
|
105
|
-
|
106
|
-
output = svn_get.communicate()[0]
|
107
|
-
|
108
|
-
timer.cancel()
|
109
|
-
|
110
|
-
plist = plistlib.readPlistFromString(output)
|
111
|
-
|
112
|
-
return int(plist[PLIST_BUILD_NUMBER_KEY])
|
113
|
-
|
114
|
-
def update_file(plist_path, username, password):
|
115
|
-
plist_updating = Popen(["svn", "update", plist_path, "--username", username, "--password", password], stdin=PIPE, stdout=PIPE)
|
116
|
-
plist_updating.communicate()
|
117
|
-
|
118
|
-
def write_build_number(build_number, plist_path):
|
119
|
-
plist = plistlib.readPlist(plist_path)
|
120
|
-
plist[PLIST_BUILD_NUMBER_KEY] = str(build_number)
|
121
|
-
plistlib.writePlist(plist, plist_path)
|
122
|
-
|
123
|
-
def timeout_waiting_for_repository(svn_process):
|
124
|
-
print_warning("Timeout waiting for repository. App build version is not increased.")
|
125
|
-
|
126
|
-
svn_process.kill()
|
127
|
-
|
128
|
-
if __name__ == '__main__':
|
129
|
-
sys.exit(main())
|