Skip to content

Commit

Permalink
Merge pull request #2 from archivesspace/fix-for-future-versions
Browse files Browse the repository at this point in the history
Remove hard-coded version numbers
  • Loading branch information
lmcglohon authored Jan 29, 2018
2 parents 5b5a032 + 2ad707a commit 6411902
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ dist/
META-INF/
*.swp
out/
ArchonMigrator.iml
archon_migration.iml
/logs/*.xml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ArchonMigrator
archon_migration
============

The Archon to ArchivesSpace migration tool enables migration of data from an Archon instance to an ArchivesSpace instance. It is the most comprehensive and efficient option for people who have not previously migrated and want to migrate all of their Archon data to ArchivesSpace.
Expand Down
12 changes: 12 additions & 0 deletions archon-migration.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib" level="project" />
</component>
</module>
14 changes: 7 additions & 7 deletions makep
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# simple script to build program distribution

# delete the directory with old distribution
rm -rv dist/ArchonMigrator
rm -rv dist/archon_migration

# create new directory
mkdir dist/ArchonMigrator
mkdir dist/ArchonMigrator/lib
mkdir dist/ArchonMigrator/logs
mkdir -p dist/archon_migration
mkdir -p dist/archon_migration/lib
mkdir -p dist/archon_migration/logs

# copy the needed files
cp -v out/artifacts/ArchonMigrator_jar/* dist/ArchonMigrator/lib
cp -v run.* dist/ArchonMigrator
cp -v out/artifacts/archon_migration_jar/* dist/archon_migration/lib
cp -v run.* dist/archon_migration

# create a zip of the source code
cd dist

zip -vr ArchonMigrator.zip ArchonMigrator -x "*.svn*" "*.DS_Store*"
zip -vr archon_migration.zip archon_migration -x "*.svn*" "*.DS_Store*"
2 changes: 1 addition & 1 deletion run.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@ECHO OFF
REM simple script to run the ArchonMigrator program
REM simple script to run the archon_migration program
java -Xmx1024m -Dfile.encoding=UTF-8 -cp "lib/*" org.nyu.edu.dlts.dbCopyFrame
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
# simple script to run the ArchonMigrator program
# simple script to run the archon_migration program
java -Xmx1024m -cp "lib/*" org.nyu.edu.dlts.dbCopyFrame
6 changes: 3 additions & 3 deletions src/org/nyu/edu/dlts/dbCopyFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ public void run() {

// check the current aspace version to make sure
String aspaceVersion = ascopy.getASpaceVersion();
double aspaceVersionDouble = new Double(aspaceVersion.replaceAll("[^0-9.]", ""));

if (!aspaceVersion.isEmpty() && !ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION.contains(aspaceVersion)) {
String message = "Unsupported Archivesspace Version\nSupport Versions: " +
ASpaceCopyUtil.SUPPORTED_ASPACE_VERSION + " ...\n";
if (!aspaceVersion.isEmpty() && aspaceVersionDouble < 2.1) {
String message = "Unsupported Archivesspace Version\nSupport Versions: v2.1 and higher ...\n";

consoleTextArea.append(message);
reEnableCopyButtons();
Expand Down
1 change: 0 additions & 1 deletion src/org/nyu/edu/dlts/utils/ASpaceCopyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
* Utility class for copying data from the Archon to Archivesspace
*/
public class ASpaceCopyUtil implements PrintConsole {
public static final String SUPPORTED_ASPACE_VERSION = "v2.1,v2.2";

// String to indicate when no ids where return from aspace backend
private final String NO_ID = "no id assigned";
Expand Down

0 comments on commit 6411902

Please sign in to comment.