- Run the full testsuite (``tests\testament\tester all``) and ensure it's green; actually ensure travis is green (Usually the case these days) - Update news.txt - write a news ticker entry - Update the version - In system.nim - In compiler.nimble - In lib/stdlib.nimble - Recompile koch! - Generate the full docs; koch web0 - Generate the installers * koch csource -d:release * koch xz * koch nsis - Test the installers: koch testinstall - Tag the release - Merge devel into master - Update csources To build the Windows release, currently this .bat file is used which is rather tied to my computer. ``` set NIMVER=0.14.2 Rem Build -docs file: koch web0 cd web\upload 7z a -tzip docs-%NIMVER%.zip *.html move /y docs-%NIMVER%.zip download cd ..\.. Rem Build .zip file: REm koch csources -d:release rem koch xz -d:release rem move /y build\nim-%NIMVER%.zip web\upload\download ReM Build Win32 version: set PATH=C:\Users\Anwender\projects\nim\dist\mingw\bin;%PATH% cd build call build.bat cd .. nim c koch || exit /b koch boot -d:release || exit /b cd ..\nimsuggest nim c -d:release --noNimblePath --path:..\nim nimsuggest || exit /b copy /y nimsuggest.exe ..\nim\bin || exit /b cd ..\nim koch nsis -d:release || exit /b move /y build\nim_%NIMVER%.exe web\upload\download\nim-%NIMVER%_x32.exe || exit /b ReM Build Win64 version: set PATH=C:\Users\Anwender\projects\win-builds\bin;%PATH% cd build call build64.bat cd .. nim c koch || exit /b koch boot -d:release || exit /b cd ..\nimsuggest nim c -d:release --noNimblePath --path:..\nim nimsuggest || exit /b copy /y nimsuggest.exe ..\nim\bin || exit /b cd ..\nim koch nsis -d:release || exit /b move /y build\nim_%NIMVER%.exe web\upload\download\nim-%NIMVER%_x64.exe || exit /b ``` Shell script to build a source tarball: ```sh #!/bin/sh set -eu tmp_dir=$(mktemp -d) cd $tmp_dir git clone -q --depth 1 https://github.com/nim-lang/Nim.git cd Nim git clone -q --depth 1 https://github.com/nim-lang/csources ( cd csources && sh build.sh ) bin/nim c koch ./koch boot -d:release ./koch web0 PATH=$PATH:$(pwd)/bin ./koch csource -d:release ./koch xz -d:release ``` Shell script, work in progress: ```sh #!/bin/sh set -eu # Test and release a new Nim version ask() { echo "$1 Enter to continue, Ctrl-C to stop" read _ } ask "Ensure that https://travis-ci.org/nim-lang/Nim is green" ask "Ensure the last build on http://ci.nim-lang.org/ is successful" orig_dir=$(pwd) tmp_dir=$(mktemp -d) cd $tmp_dir # Clone repos #git clone https://github.com/nim-lang/nim.git --depth 1 cp -a /tmp/nim . cd nim #git clone https://github.com/nim-lang/nimble.git --depth 1 cp -a /tmp/nimble . #git clone --depth 1 https://github.com/nim-lang/csources cp -a /tmp/csources . # Build Nim cd csources && sh build.sh cd .. bin/nim c koch ./koch boot -d:release # Run the full testsuite (tests\testament\tester all) and ensure it's green; actually ensure travis is green (Usually the case these days) # Set version old_version=$(grep ^version compiler.nimble | cut -d'"' -f2) nim_major="$1" nim_minor="$2" nim_patch="$3" new_version="$nim_major.$nim_minor.$nim_patch" ask "Old version is $old_version - new version is $new_version" # Update the version sed -i "s/^ NimMajor\*: int = [0-9]*$/ NimMajor*: int = $nim_major/" lib/system.nim sed -i "s/^ NimMinor\*: int = [0-9]*$/ NimMinor*: int = $nim_minor/" lib/system.nim sed -i "s/^ NimPatch\*: int = [0-9]*$/ NimPatch*: int = $nim_patch/" lib/system.nim sed -i "s/version = .*/version = \"$new_version\"/" compiler.nimble sed -i "s/version = .*/version = \"$new_version\"/" lib/stdlib.nimble git diff | cat -n ask "Ensure the version was updated in 3 files" # Update news.txt # write a news ticker entry # Generate the full docs ./koch web0 # Generate the installers ./koch csource -d:release ./koch xz -d:release ./koch nsis ```