Skip to content

Commit

Permalink
umc ide: Improve the keystore signing process
Browse files Browse the repository at this point in the history
With this we allow off-the-source keystore path
to be specified.
  • Loading branch information
timotei committed Mar 21, 2015
1 parent b6b172c commit d3ea22d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion utils/umc_dev/build/.gitignore
@@ -1,3 +1,4 @@
workspace/
binaries/
updates/
updates/
keystore
11 changes: 5 additions & 6 deletions utils/umc_dev/build/SConstruct
Expand Up @@ -21,11 +21,12 @@ opts.AddVariables(
PathVariable( "eclipsedir", "The directory that contains the eclipse binary and all the needed plugins",
"", PathVariable.PathIsDir ),
PathVariable( "updatesdir", "The directory that should contain the updates for the plugin",
"updates", PathVariable.PathAccept ),
"updates", PathVariable.PathIsDirCreate ),
PathVariable( "binariesdir", "The directory that should contain the binaries for the plugin",
"binaries", PathVariable.PathAccept ),
"binaries", PathVariable.PathIsDirCreate ),
PathVariable( "storepass", "The store pass for signing the jars", "", PathVariable.PathAccept ),
PathVariable( "keypass", "The key pass for signing the jars", "", PathVariable.PathAccept )
PathVariable( "keypass", "The key pass for signing the jars", "", PathVariable.PathAccept ),
PathVariable( "keystorepath", "The path to the keystore used for signing the jars", "", PathVariable.PathIsFile)
)
env = Environment( options = opts )
opts.Save( '.scons-option-cache', env )
Expand All @@ -52,9 +53,6 @@ if os.path.exists( temp_build_dir ):

os.makedirs( temp_build_dir )

# copy the keystore to target
shutil.copyfile( 'keystore', temp_build_dir + '/keystore' )

# now, we need to find 2 things:
# 1) file: org.eclipse.equinox.launcher_*.jar
# 2) dir: org.eclipse.pde.build_*
Expand Down Expand Up @@ -96,6 +94,7 @@ subprocess.call( [
"-Declipse.pdebuild.templates=" + pde_build_dir + "/templates",
"-DstorePass=" + store_pass,
"-DkeyPass=" + key_pass,
"-DkeystorePath=" + env["keystorepath"],
"-buildfile", "build.xml" ] )

# Some cleanup
Expand Down
2 changes: 1 addition & 1 deletion utils/umc_dev/build/build.xml
Expand Up @@ -34,7 +34,7 @@
<fileset dir="${buildDirectory}/repository"/>
</move>

<signjar alias="wesnoth" keystore="keystore" storepass="${storePass}" keypass="${keyPass}">
<signjar alias="wesnoth" keystore="${keystorePath}" storepass="${storePass}" keypass="${keyPass}">
<path>
<fileset dir="${updatesDir}" includes="**/org.wesnoth*.jar" />
</path>
Expand Down
Binary file removed utils/umc_dev/build/keystore
Binary file not shown.

0 comments on commit d3ea22d

Please sign in to comment.