summaryrefslogtreecommitdiff
path: root/project/VersionUtil.scala
Commit message (Collapse)AuthorAgeFilesLines
* Merge 2.11.x into 2.12.xAdriaan Moors2017-04-071-1/+1
|\ | | | | | | Include 828a892 Merge pull request #5753
| * bump copyright year to 2017Philippus Baalman2017-03-021-1/+1
| |
* | new version numbers for snapshot and integration builds, new repositoryLukas Rytz2017-03-081-13/+20
| | | | | | | | | | | | | | | | | | | | Integration builds now have version number like `2.12.2-bin-sha7` or `2.13.0-pre-sha7` and are published to scala-integration (no longer scala-release-temp). scala-release-temp is still used in the bootstrap script for publishing intermediate artifacts (starr, locker). Various cleanups in the scripts.
* | Get commit SHA and date with JGitStefan Zeiger2017-02-281-10/+28
| | | | | | | | | | | | | | | | | | | | | | In order to get the SHA and date we used to run shell scripts and parse the output of `git` commands. On Windows we even ran a batch file that looked for `bash.exe` and then ran the shell script in bash. Using JGit should be more robust than the old Rube Goldberg implementation. The values produced are the same, except for the time zone. Previously the timestamp was formatted with the local timezone, now we use UTC.
* | Workaround bug in Scala runtime reflection on JDK 9Jason Zaugg2017-02-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying bug is tracked as https://github.com/scala/scala-dev/issues/304 and blocks our SBT starting on JDK 9. This commit avoids using the empty package in our build definition. After this change, I needed to manually clean the class files from the build definition as follows, which might indicate a bug in SBT. $ sbt ... /Users/jz/code/scala-java9-ci/build.sbt:0: warning: imported `BuildSettings' is permanently hidden by definition of object BuildSettings import ..., _root_.scala.build.BuildSettings, ... ^C % rm -rf project/target/scala-2.10/sbt-0.13/classes/ % sbt # okay second time
* | Merge pull request #5379 from szeiger/wip/persist-buildcharacterStefan Zeiger2016-10-271-3/+6
|\ \ | | | | | | Store buildcharacter.properties in scala-compiler.jar
| * | Store buildcharacter.properties in scala-compiler.jarStefan Zeiger2016-09-061-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to all the individual projects’ version properties files that we already keep in `scala-compiler.jar` we now write a new `scala-buildcharacter.properties` which is identical to the `buildcharacter.properties` written to the root directory by `generateBuildCharacterPropertiesFile`. The new task `extractBuildCharacterPropertiesFile` extracts it from the bootstrap Scala compiler and writes the usual `buildcharacter.properties`. This can be used to reproduce the exact version information for all modules in builds that start from an arbitrary published Scala version instead of being triggered directly by a bootstrap job.
* | | assorted typo fixes, cleanup, updating of commentsSeth Tisue2016-10-241-1/+1
| | | | | | | | | | | | | | | | | | just in time for Halloween. "boostrap" is definitely the most adorable typo evah -- and one of the most common, too. but we don't want to scare anybody.
* | | Merge pull request #5416 from SethTisue/merge-2.12.0-to-2.12.x-sep-24Seth Tisue2016-10-051-1/+1
|\ \ \ | | | | | | | | merge 2.12.0 onto 2.12.x [ci: last-only]
| * | | Including Lightbend in `-version` message.Adriaan Moors2016-09-271-1/+1
| |/ / | | | | | | | | | Also consistently use "LAMP/EPFL" and not "EPFL LAMP".
* / / use proper lightbend.com and scala-sbt.org URLsSeth Tisue2016-09-281-1/+1
|/ / | | | | | | | | not dl.bintray.com, it's an implementation detail that they're our current provider
* | Switch remaining uses of ant over to sbtStefan Zeiger2016-08-231-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Modify `tools/scaladoc-diff` to use sbt instead of ant. - Move `stability-test.sh` from `tools` to `scripts`. With the new build process without separate `locker` and `strap` stages, it doesn’t make sense to call this script without first setting up the proper test environment in a CI build. - Replace the use of `build.number` in `bootstrap` with a new `SHA-NIGHTLY` mode for `baseVersionSuffix`. - Make `partest` call sbt instead of ant for initializing the classpath and use the new classpath location (`quick` instead of `pack`).
* | Switch Windows CI build to sbt (w/ some sbt build improvements)Stefan Zeiger2016-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use sbt in `integrate/windows`: This essentially combines the Unix CI jobs `validate/publish-core` and `validate/test`, first publishing a local release built with STARR and then building a new version with that and running all tests on it. - Unify repository handling across build scripts: A new function `generateRepositoriesConfig` in `common`, based on the existing code in `integrate/bootstrap`, writes the `repositories` file for sbt, either with or without an extra bootstrap repository for resolving a previously built version. It is used in all CI scripts to ensure that artifacts are only resolved through the sanctioned proxies and upstream repositories. - The repository URL arguments in `setupPublishCore` and `setupValidateTest` are now optional as well. These commands are used without a URL from `integrate/windows`, which publishes to `local` instead of a temporary remote repository. - `testAll` is now a task instead of a command. It runs the same sequence of sub-tasks as before but does not propagate failures immediately. It always runs all subtasks and reports errors at the end. - The `generateBuildCharacterPropertiesFile` task now includes all properties from `versions.properties` (whose values have potentially been overwritten with `-D` options) in `buildcharacter.properties`.
* | Switch the bootstrap build over to sbtStefan Zeiger2016-07-151-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | All of the individual ant builds that occured during `bootstrap` are replaced by equivalent sbt builds. - Allow extra dashes in version suffix when using SPLIT - Clean up ScriptCommands - Building an extra `locker` for stability testing with ant was not necessary but sbt also drops `strap`, so we need to build again with `quick` to get the equivalent of `strap`. The script for checking stability is invoked directly from the bootstrap script, not from sbt. - `STARR` and `locker` build output is still logged to `logs/builds`, the main build runs log directly to the main console with colored output. - Allow `—show-log` option on partest command line in sbt - Normalize inferred LUB in `run/t7747-repl.scala` - Add `normalize` feature from `ReplTest` to `InteractiveTest` - Normalize inferred LUBs in `presentation/callcc-interpreter`
* Use sbt for PR validationStefan Zeiger2016-06-141-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support directories in `-doc-external-doc`: It is documented as accepting a “classpath_entry_path” for the keys but this only worked for JARs and not for individual class files. When checking for external-doc mappings for a Symbol, we now find the root directory relative to a class file instead of using the full class file path. The corresponding tests for SI-191 and SI8557 are also fixed to support individual class files instead of JARs in partest. This is required for the sbt build which runs partest on “quick” instead of “pack”. - Fix version and repository handling for bootstrapping. The bootstrap `scalaInstance` can now be resolved from any repository added to the project (not just the bootstrap repositories) by using a different workaround for https://github.com/sbt/sbt/issues/1872. - Workaround for https://github.com/sbt/sbt/issues/2640 (putting the wrong `scalaInstance` on partest’s classpath). The required `ScalaInstance` constructor is deprecated, so we have to disable deprecation warnings and fatal warnings until there is a better fix. - Add MiMa to the sbt build (port of the old `test.bc` ant task). The sbt-mima plugin doesn’t have all the features we need, so we do it manually in a similar way to what the plugin does. Checks are done in both directions for the `library` and `compiler` projects. The base version has to be set in `build.sbt`. When set to `None`, MiMa checks are skipped. MiMa checks are run sequentially to avoid spurious errors (see https://github.com/typesafehub/migration-manager/issues/115). - Port the OSGi tests to the sbt build. The set of JARs that gets copied into build/osgi as bundles is a bit different from the ant build. We omit the source JARs but add additional modules that are part of the Scala distribution, which seems more correct. - Get rid up `pull-binary-libs.sh` for the sbt build. Add artifacts are resolved from the special bootstrap repository through Ivy. The special `code.jar` and `instrumented.jar` artifacts are copied to the location where partest expects them (because these paths are hardcoded in partest). Other extra JARs for partest in `test/files/lib` are referenced directly from the Ivy cache. - Move common settings that should be available with unqualified names in local `.sbt` files and on the command line into an auto-plugin. - Add an `antStyle` setting to sbt to allow users to easily enable ant-style incremental compilation instead of sbt’s standard name hashing with `set antStyle := true`. - Disable verbose `info`-level logging during sbt startup for both, `validate/test` and `validate/publish-core` jobs. Update logging is no longer disabled when running locally (where it is useful and doesn’t generate excessive output). - Pass optimization flags for scalac down to partest, using the new partest version 1.0.15\6. - Call the new sbt-based PR validation from `scripts/jobs/validate/test`. - Disable the tests `run/t7843-jsr223-service` and `run/t7933` from https://github.com/scala/scala/pull/4959 for now. We need to set up a new test project (either partest or junit) that can run them on a packaged version of Scala, or possibly move them into a separate project that would naturally run from a packaged Scala as part of the community build.
* [sbt] Allow system properties to override entries in verions.propsJason Zaugg2016-02-191-1/+3
|
* bump copyright year to 2016Seth Tisue2016-02-031-1/+1
|
* Use sbt for PR validation builds.Stefan Zeiger2016-01-121-39/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Improve version handling in the sbt build: The new settings `baseVersion` and `baseVersionSuffix` make it easier to set version numbers for different kinds of builds in a consistent way without e.g. having to first get a git SHA outside of sbt. The new task `generateBuildCharacterPropertiesFile` writes the file `buildcharacter.properties` to the root dir. The format is compatible with the same file produced by the ANT build but it only contains a subset of the properties, in particular the Maven version, which is needed in publishing scripts and passed around between different Jenkins jobs as `jenkins.properties`. SHAs in version numbers are consistently shortened to 7 digits (as used by git and github). Previously we used 7 digits in Maven snapshot version numbers but 10 digits in canonical and OSGi version numbers. # Add Jenkins script support to the sbt build: The new command `setupPublishCore` takes the PR validation snapshot repository as an argument and changes the required settings for the `publish-core` build (use SHA-SNAPSHOT versioning, compile with optimization enabled, do not publish scaladoc sets) For example, the following command can be used to generate `buildcharacter.properties` with the version numbers needed for PR validation builds: sbt setupPublishCore dummy generateBuildCharacterPropertiesFile The sbt build will now automatically detect and use a “~/.credentials” file with the credentials for publishing to a remote repository. # Call sbt from `publish-core`: The correct`$SBT_CMD` is set directly in `bootstrap` and used by `publish-core` to first generate `buildcharacter.properties` and then build and publish. Parsing the git revision, computing a version number and getting binary dependencies are no longer required in the script. This is all done in the sbt build.
* Improve version handling and scaladoc generation in sbt buildStefan Zeiger2015-11-061-0/+103
- Move version-related code into a separate VersionUtil object - Fix the canonical version. The sbt build previously took the full version including the suffix (plus timestamp and hash) whereas the ant build uses the version without the suffix - Include the version number in the generated scaladocs - Add project descriptions and include them in the scaladocs (like the ant build does) - Add other missing scaladoc options to the sbt build - Copy resources in all subprojects when building dist/mkQuick and fix `includeFilter` settings to include all required files