=pro #15664 Use scala version in dist files
This commit is contained in:
parent
e3ee59c94d
commit
c4ee032ead
2 changed files with 17 additions and 3 deletions
|
|
@ -33,7 +33,8 @@ object Dist {
|
||||||
distSources <<= (distDependencies, distLibJars, distSrcJars, distDocJars, doc in ScalaUnidoc, generate in Sphinx in docsProject) map DistSources,
|
distSources <<= (distDependencies, distLibJars, distSrcJars, distDocJars, doc in ScalaUnidoc, generate in Sphinx in docsProject) map DistSources,
|
||||||
distDirectory <<= crossTarget / "dist",
|
distDirectory <<= crossTarget / "dist",
|
||||||
distUnzipped <<= distDirectory / "unzipped",
|
distUnzipped <<= distDirectory / "unzipped",
|
||||||
distFile <<= (distDirectory, version) { (dir, v) => dir / ("akka-" + v + ".zip") },
|
distFile <<= (distDirectory, version, scalaBinaryVersion) { (dir, v, sbv) =>
|
||||||
|
dir / ("akka_" + sbv + "-" + v + ".zip") },
|
||||||
dist <<= distTask
|
dist <<= distTask
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,15 @@ function get_current_version {
|
||||||
echo ${result%$code0}
|
echo ${result%$code0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# get the scalaBinaryVersion from sbt
|
||||||
|
# a little messy as the ansi escape codes are included
|
||||||
|
function get_scala_binary_version {
|
||||||
|
local result=$(sbt scalaBinaryVersion | tail -1 | cut -f2)
|
||||||
|
# remove ansi escape code from end
|
||||||
|
local code0=$(echo -e "\033[0m")
|
||||||
|
echo ${result%$code0}
|
||||||
|
}
|
||||||
|
|
||||||
# store the current git branch for cleaning up
|
# store the current git branch for cleaning up
|
||||||
declare -r initial_branch=$(get_current_branch)
|
declare -r initial_branch=$(get_current_branch)
|
||||||
|
|
||||||
|
|
@ -264,6 +273,10 @@ else
|
||||||
echolog "Publishing to ${publish_path}"
|
echolog "Publishing to ${publish_path}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echolog "Getting scalaBinaryVersion from sbt..."
|
||||||
|
declare -r scala_binary_version=$(get_scala_binary_version)
|
||||||
|
echolog "scalaBinaryVersion is ${scala_binary_version}"
|
||||||
|
|
||||||
[[ $run_tests ]] && echolog "All tests will be run"
|
[[ $run_tests ]] && echolog "All tests will be run"
|
||||||
|
|
||||||
# try ssh'ing to the release server
|
# try ssh'ing to the release server
|
||||||
|
|
@ -299,7 +312,7 @@ else
|
||||||
fi
|
fi
|
||||||
try sbt $RELEASE_OPT build-release
|
try sbt $RELEASE_OPT build-release
|
||||||
echolog "Creating gzipped tar download..."
|
echolog "Creating gzipped tar download..."
|
||||||
try tar -cz -C ${unzipped_dir} -f ${release_dir}/downloads/akka-${version}.tgz akka-${version}
|
try tar -cz -C ${unzipped_dir} -f ${release_dir}/downloads/akka_${scala_binary_version}-${version}.tgz akka-${version}
|
||||||
echolog "Successfully created local release"
|
echolog "Successfully created local release"
|
||||||
|
|
||||||
# check binary compatibility for dry run
|
# check binary compatibility for dry run
|
||||||
|
|
@ -358,7 +371,7 @@ fi
|
||||||
echolog "Pushing ${release_dir} to ${publish_path} ..."
|
echolog "Pushing ${release_dir} to ${publish_path} ..."
|
||||||
if [ $dry_run ]; then
|
if [ $dry_run ]; then
|
||||||
echodry "Not actually pushing to server. Command:"
|
echodry "Not actually pushing to server. Command:"
|
||||||
echodry " rsync -rlpvz --chmod=Dg+ws,Fg+w ${release_dir}/ ${publish_path}/"
|
echodry " rsync -rlpvz --chmod=Dg+ws,Fg+w --exclude ${release_dir}/downloads ${release_dir}/ ${publish_path}/"
|
||||||
echodry " sbt upload-release"
|
echodry " sbt upload-release"
|
||||||
else
|
else
|
||||||
important rsync -rlpvz --chmod=Dg+ws,Fg+w --exclude ${release_dir}/downloads ${release_dir}/ ${publish_path}/
|
important rsync -rlpvz --chmod=Dg+ws,Fg+w --exclude ${release_dir}/downloads ${release_dir}/ ${publish_path}/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue