mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 16:52:46 +08:00
SQOOP-383 Version tool is not working
git-svn-id: https://svn.apache.org/repos/asf/incubator/sqoop/trunk@1197390 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
17bd8b061b
commit
5bbc924c81
@ -107,7 +107,7 @@ Release 1.4.0-incubating
|
|||||||
|
|
||||||
SQOOP-386 Namespace migration cleanup
|
SQOOP-386 Namespace migration cleanup
|
||||||
|
|
||||||
SQOOP-383 SQOOP-369 Version tool is not working
|
SQOOP-383 Version tool is not working
|
||||||
|
|
||||||
SQOOP-381 Migrate cli and config packages to new name space
|
SQOOP-381 Migrate cli and config packages to new name space
|
||||||
|
|
||||||
|
@ -33,8 +33,7 @@ public VersionTool() {
|
|||||||
@Override
|
@Override
|
||||||
/** {@inheritDoc} */
|
/** {@inheritDoc} */
|
||||||
public int run(SqoopOptions options) {
|
public int run(SqoopOptions options) {
|
||||||
// FIXME with maven buildnumber plugin
|
System.out.print(new org.apache.sqoop.SqoopVersion().toString());
|
||||||
System.out.print("FIXME ");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,6 +33,9 @@ specifiedgithash=$3
|
|||||||
outputdir=${buildroot}/src/com/cloudera/sqoop
|
outputdir=${buildroot}/src/com/cloudera/sqoop
|
||||||
outputfile=${outputdir}/SqoopVersion.java
|
outputfile=${outputdir}/SqoopVersion.java
|
||||||
|
|
||||||
|
newoutputdir=${buildroot}/src/org/apache/sqoop
|
||||||
|
newoutputfile=${newoutputdir}/SqoopVersion.java
|
||||||
|
|
||||||
signature=$specifiedgithash
|
signature=$specifiedgithash
|
||||||
if [ -z "$signature" ]; then
|
if [ -z "$signature" ]; then
|
||||||
signature=`git log -1 --pretty=format:%H`
|
signature=`git log -1 --pretty=format:%H`
|
||||||
@ -45,14 +48,45 @@ mkdir -p ${outputdir}
|
|||||||
cat > ${outputfile} <<EOF
|
cat > ${outputfile} <<EOF
|
||||||
// generated by src/scripts/write-version-info.sh
|
// generated by src/scripts/write-version-info.sh
|
||||||
package com.cloudera.sqoop;
|
package com.cloudera.sqoop;
|
||||||
public final class SqoopVersion {
|
|
||||||
|
/**
|
||||||
|
* @deprecated use org.apache.sqoop.SqoopVersion instead
|
||||||
|
* @see org.apache.sqoop.SqoopVersion
|
||||||
|
*/
|
||||||
|
public final class SqoopVersion extends org.apache.sqoop.SqoopVersion {
|
||||||
|
public SqoopVersion() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
public static final String VERSION =
|
||||||
|
org.apache.sqoop.SqoopVersion.VERSION;
|
||||||
|
public static final String GIT_HASH =
|
||||||
|
org.apache.sqoop.SqoopVersion.GIT_HASH;
|
||||||
|
public static final String COMPILE_USER =
|
||||||
|
org.apache.sqoop.SqoopVersion.COMPILE_USER;
|
||||||
|
public static final String COMPILE_HOST =
|
||||||
|
org.apache.sqoop.SqoopVersion.COMPILE_HOST;
|
||||||
|
public static final String COMPILE_DATE =
|
||||||
|
org.apache.sqoop.SqoopVersion.COMPILE_DATE;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
mkdir -p ${newoutputdir}
|
||||||
|
cat > ${newoutputfile} <<EOF
|
||||||
|
// generated by src/scripts/write-version-info.sh
|
||||||
|
package org.apache.sqoop;
|
||||||
|
|
||||||
|
public class SqoopVersion {
|
||||||
public SqoopVersion() {
|
public SqoopVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final String VERSION="${version}";
|
public static final String VERSION="${version}";
|
||||||
public static final String GIT_HASH="${signature}";
|
public static final String GIT_HASH="${signature}";
|
||||||
public static final String COMPILE_USER="${USER}";
|
public static final String COMPILE_USER="${USER}";
|
||||||
public static final String COMPILE_HOST="${host}";
|
public static final String COMPILE_HOST="${host}";
|
||||||
public static final String COMPILE_DATE="${compiledate}";
|
public static final String COMPILE_DATE="${compiledate}";
|
||||||
|
|
||||||
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "Sqoop " + VERSION + "\n"
|
return "Sqoop " + VERSION + "\n"
|
||||||
+ "git commit id " + GIT_HASH + "\n"
|
+ "git commit id " + GIT_HASH + "\n"
|
||||||
@ -61,4 +95,3 @@ public final class SqoopVersion {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user