Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
  • Loading branch information
borsboom committed Feb 20, 2016
2 parents c4f4063 + 434dbf6 commit 9c806a1
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 25 deletions.
35 changes: 23 additions & 12 deletions doc/MAINTAINER_GUIDE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Maintainer guide

## Next release:

* Integrate FreeBSD binaries and packages
[#1253](https://github.com/commercialhaskell/stack/issues/1253#issuecomment-185993240)

## Pre-release checks

The following should be tested minimally before a release is considered good
to go:

* After GHC 8.0: maybe switch to Debian 8 and CentOS 6.7 Vagrant boxes for
building Stack binaries (to match GHC bindists) and drop support for Debian 7.
* Ensure `release` and `stable` branches merged to `master`
* Integration tests pass on a representative Windows, Mac OS X, and Linux (Linux
is handled by Jenkins automatically): `stack install --pedantic && stack test
Expand All @@ -23,13 +26,16 @@ to go:
* stack.cabal: bump the version number to release (even third
component)
* ChangeLog: rename the "unreleased changes" section to the new version
* Cut a release candidate branch from master
* Cut a release candidate branch `rc/vX.Y.Z` from master
* In master branch:
* stack.cabal: bump version number to unstable (odd third component)
* Changelog: add new "unreleased changes" section
* stack.yaml: bump to use latest LTS version
* stack.yaml: bump to use latest LTS version, and check whether extra-deps
still needed
* In RC branch:
* Update the ChangeLog:
* Update the ChangeLog
([this comparison](https://github.com/commercialhaskell/stack/compare/release...master)
is handy):
* Check for any important changes that missed getting an entry in Changelog
* Check for any entries that snuck into the previous version's changes
due to merges
Expand All @@ -45,7 +51,7 @@ to go:
[releases.yaml](https://github.com/fpco/stackage-content/blob/master/stack/releases.yaml),
[install_and_upgrade.md](https://github.com/commercialhaskell/stack/blob/master/doc/install_and_upgrade.md),
and
[README.md](https://github.com/commercialhaskell/stack/blob/master/README.md)
`README.md`

## Release process

Expand All @@ -55,11 +61,16 @@ for requirements to perform the release, and more details about the tool.

* Create a
[new draft Github release](https://github.com/commercialhaskell/stack/releases/new)
with tag `vX.Y.Z` (where X.Y.Z is the stack package's version)
with tag and name `vX.Y.Z` (where X.Y.Z is the stack package's version), targetting the
RC branch

* On each machine you'll be releasing from, set environment variables:
`GITHUB_AUTHORIZATION_TOKEN`, `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`,
`AWS_DEFAULT_REGION`
`AWS_DEFAULT_REGION`.

Note: since one of the tools (rpm-s3 on CentOS) doesn't support AWS temporary
credentials, you can't use MFA with the AWS credentials (`AWS_SECURITY_TOKEN`
is ignored).

* On a machine with Vagrant installed:
* Run `etc/scripts/vagrant-releases.sh`
Expand All @@ -81,7 +92,7 @@ for requirements to perform the release, and more details about the tool.

* Update the `stable` branch similarly

* Delete the RC branch
* Delete the RC branch (locally and on origin)

* Publish Github release

Expand Down Expand Up @@ -109,8 +120,8 @@ for requirements to perform the release, and more details about the tool.

* Merge any changes made in the RC/release/stable branches to master.

* Announce to [email protected] [email protected]
[email protected] mailing lists

* Keep an eye on the
[Hackage matrix builder](http://matrix.hackage.haskell.org/package/stack)

* Announce to [email protected], [email protected],
[email protected] mailing lists
18 changes: 15 additions & 3 deletions etc/scripts/release.hs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ main =
gUploadLabel = Nothing
gTestHaddocks = True
gProjectRoot = "" -- Set to real value velow.
gBuildArgs = []
global0 = foldl (flip id) Global{..} flags
-- Need to get paths after options since the '--arch' argument can effect them.
projectRoot' <- getStackPath global0 "project-root"
Expand Down Expand Up @@ -102,6 +103,11 @@ options =
"Label to give the uploaded release asset"
, Option "" [noTestHaddocksOptName] (NoArg $ Right $ \g -> g{gTestHaddocks = False})
"Disable testing building haddocks."
, Option "" [buildArgsOptName]
(ReqArg
(\v -> Right $ \g -> g{gBuildArgs = words v})
"\"ARG1 ARG2 ...\"")
"Additional arguments to pass to 'stack build'."
]

-- | Shake rules.
Expand Down Expand Up @@ -149,11 +155,12 @@ rules global@Global{..} args = do
withTempDir $ \tmpDir -> do
let cmd0 = cmd (releaseBinDir </> binaryName </> stackExeFileName)
(stackArgs global)
gBuildArgs
["--local-bin-path=" ++ tmpDir]
() <- cmd0 $ concat $ concat
[["install --pedantic --no-haddock-deps"], [" --haddock" | gTestHaddocks]]
() <- cmd0 "install --resolver=lts-4.0 cabal-install"
let cmd' = cmd (AddPath [tmpDir] []) stackProgName (stackArgs global)
let cmd' = cmd (AddPath [tmpDir] []) stackProgName (stackArgs global) gBuildArgs
() <- cmd' "test --pedantic --flag stack:integration-tests"
return ()
copyFileChanged (releaseBinDir </> binaryName </> stackExeFileName) out
Expand Down Expand Up @@ -223,6 +230,7 @@ rules global@Global{..} args = do
actionOnException
(cmd stackProgName
(stackArgs global)
gBuildArgs
["--local-bin-path=" ++ takeDirectory out]
"install --pedantic")
(removeFile out)
Expand Down Expand Up @@ -345,7 +353,7 @@ rules global@Global{..} args = do
need stageFiles
return stageFiles

getDocFiles = getDirectoryFiles "." ["LICENSE", "*.md", "doc//*"]
getDocFiles = getDirectoryFiles "." ["LICENSE", "*.md", "doc//*.md"]

distroVersionFromPath path versions =
let path' = dropDirectoryPrefix releaseDir path
Expand Down Expand Up @@ -582,6 +590,9 @@ uploadLabelOptName = "upload-label"
noTestHaddocksOptName :: String
noTestHaddocksOptName = "no-test-haddocks"

buildArgsOptName :: String
buildArgsOptName = "build-args"

-- | Arguments to pass to all 'stack' invocations.
stackArgs :: Global -> [String]
stackArgs Global{..} = ["--install-ghc", "--arch=" ++ display gArch]
Expand Down Expand Up @@ -630,5 +641,6 @@ data Global = Global
, gArch :: !Arch
, gBinarySuffix :: !String
, gUploadLabel :: (Maybe String)
, gTestHaddocks :: !Bool }
, gTestHaddocks :: !Bool
, gBuildArgs :: [String] }
deriving (Show)
2 changes: 1 addition & 1 deletion etc/scripts/vagrant-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ with_vagrant() {
vagrant up
vagrant provision
vagrant rsync
vagrant ssh -c "export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; gpg --import /vagrant/.stack-work/gpg-secret-key.asc; cd /vagrant && (cd etc/scripts && stack --install-ghc build) && \$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks $2"
vagrant ssh -c "export GITHUB_AUTH_TOKEN=$GITHUB_AUTH_TOKEN; export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID; export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY; export AWS_DEFAULT_REGION=$AWS_DEFAULT_REGION; export AWS_SESSION_TOKEN=$AWS_SESSION_TOKEN; gpg --import /vagrant/.stack-work/gpg-secret-key.asc; cd /vagrant && (cd etc/scripts && stack --install-ghc build) && \$(cd etc/scripts && stack exec which stack-release-script) --no-test-haddocks $2"
vagrant halt
popd
}
Expand Down
18 changes: 9 additions & 9 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
site_name: The Haskell Tool Stack
site_description: The Haskell Tool Stack
site_author: Stack contributors
repo_url: https://github.com/commercialhaskell/stack
repo_url: https://github.com/commercialhaskell/stack/tree/master/doc
copyright: Copyright (c) 2015-2016, Stack contributors
docs_dir: doc
site_dir: _site
Expand All @@ -10,25 +10,25 @@ theme: readthedocs
pages:
- Home: README.md
- Changelog: ChangeLog.md
- Contributors Guide: CONTRIBUTING.md
- Project documentation:
- Maintainer guide: MAINTAINER_GUIDE.md
- Signing key: SIGNING_KEY.md
- Tool documentation:
- Install/upgrade: install_and_upgrade.md
- User guide: GUIDE.md
- FAQ: faq.md
- Configuration (Project and Global): yaml_configuration.md
- Build command: build_command.md
- Dependency visualization: dependency_visualization.md
- Docker integration: docker_integration.md
- FAQ: faq.md
- GHCJS: ghcjs.md
- Install/upgrade: install_and_upgrade.md
- Nix integration: nix_integration.md
- Non-standard project initialization: nonstandard_project_init.md
- Shell Auto-completion: shell_autocompletion.md
- Travis CI: travis_ci.md
- User guide: GUIDE.md
- YAML Configuration: yaml_configuration.md
- Advanced documentation:
- Architecture: architecture.md
- Project documentation:
- Contributors Guide: CONTRIBUTING.md
- Maintainer guide: MAINTAINER_GUIDE.md
- Signing key: SIGNING_KEY.md

# These extra_templates exists only to redirect from old Sphinx URLs to new
# MkDocs URLs. This is more properly done using an HTTP redirect, but
Expand Down

0 comments on commit 9c806a1

Please sign in to comment.