|
4 | 4 |
|
5 | 5 | version=$1
|
6 | 6 |
|
7 |
| -if [[ -z ${version} ]]; then |
8 |
| - echo "No version number given." |
9 |
| - exit 1 |
10 |
| -fi |
11 |
| - |
12 |
| -if [[ ! ${version} =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then |
13 |
| - echo "Version string incorrect." |
14 |
| - exit 1 |
15 |
| -fi |
16 |
| - |
17 |
| -if ! which gh >/dev/null; then |
18 |
| - echo "Didn't find the \`gh\` binary." |
19 |
| - exit 1 |
20 |
| -fi |
21 |
| - |
22 |
| -if ! gh auth status 2>/dev/null; then |
23 |
| - echo "Couldn't connect to the github repository." |
24 |
| - exit 1 |
25 |
| -fi |
26 |
| - |
27 |
| -if ! cargo msrv --help >/dev/null; then |
28 |
| - echo "Didn't find \`msrv\` applet of \`cargo\`." |
29 |
| - exit 1 |
30 |
| -fi |
31 |
| - |
32 |
| -if ! cargo msrv --min 1.56.1 --max 1.56.1 >/dev/null; then |
33 |
| - echo "Minimum supported Rust version doesn't match avertised one." |
34 |
| - exit |
35 |
| -fi |
36 |
| - |
37 |
| -#if [[ -n $(git status --porcelain) ]]; then |
38 |
| -# echo "This repository isn't clean. Make sure to add or delete the corresponding files." |
| 7 | +#if [[ -z ${version} ]]; then |
| 8 | +# echo "No version number given." |
39 | 9 | # exit 1
|
40 | 10 | #fi
|
41 |
| - |
42 |
| -#if [[ ]]; then |
43 |
| -# echo "You're not on master." |
| 11 | +# |
| 12 | +#if [[ ! ${version} =~ ^[0-9]+.[0-9]+.[0-9]+$ ]]; then |
| 13 | +# echo "Version string incorrect." |
44 | 14 | # exit 1
|
45 | 15 | #fi
|
46 |
| - |
47 |
| -echo ">>> Testing release configuration with default features ..." |
48 |
| - |
49 |
| -cargo build --release |
50 |
| -cargo test --release |
51 |
| - |
52 |
| -echo ">>> Testing release configuration with \`applgrid\` feature ..." |
53 |
| - |
54 |
| -cargo build --release --features=applgrid |
55 |
| -cargo test --release --features=applgrid |
56 |
| - |
57 |
| -echo ">>> Testing release configuration with \`fastnlo\` feature ..." |
58 |
| - |
59 |
| -cargo build --release --features=fastnlo |
60 |
| -cargo test --release --features=fastnlo |
61 |
| - |
62 |
| -echo ">>> Testing release configuration with \`fktable\` feature ..." |
63 |
| - |
64 |
| -cargo build --release --features=fktable |
65 |
| -cargo test --release --features=fktable |
66 |
| - |
67 |
| -echo ">>> Testing if 'pineappl' can be published ..." |
68 |
| - |
69 |
| -cd pineappl |
70 |
| -cargo publish --dry-run |
71 |
| -cd .. |
72 |
| - |
73 |
| -echo ">>> Updating version strings ..." |
74 |
| - |
75 |
| -sed -i \ |
76 |
| - -e "s:\(## \[Unreleased\]\):\1\n\n## [${version}] - $(date +%d/%m/%Y):" \ |
77 |
| - -e "s:\[Unreleased\]\(\: https\://github.com/N3PDF/pineappl/compare/v\)\(.*\)...HEAD:[Unreleased]\1${version}...HEAD\n[${version}]\1\2...v${version}:" \ |
78 |
| - CHANGELOG.md |
79 |
| - |
80 |
| -sed -i \ |
81 |
| - -e "s:^version = \".*\":version = \"${version}\":" \ |
82 |
| - -e "s:^\(pineappl = .*\)version = \".*\":\1version = \"${version}\":" \ |
83 |
| - pineappl{,_capi,_cli,_py}/Cargo.toml |
84 |
| - |
85 |
| -echo ">>> Commiting and pushing changes ..." |
| 16 | +# |
| 17 | +#if ! which gh >/dev/null; then |
| 18 | +# echo "Didn't find the \`gh\` binary." |
| 19 | +# exit 1 |
| 20 | +#fi |
| 21 | +# |
| 22 | +#if ! gh auth status 2>/dev/null; then |
| 23 | +# echo "Couldn't connect to the github repository." |
| 24 | +# exit 1 |
| 25 | +#fi |
| 26 | +# |
| 27 | +#if ! cargo msrv --help >/dev/null; then |
| 28 | +# echo "Didn't find \`msrv\` applet of \`cargo\`." |
| 29 | +# exit 1 |
| 30 | +#fi |
| 31 | +# |
| 32 | +#if ! cargo msrv --min 1.56.1 --max 1.56.1 >/dev/null; then |
| 33 | +# echo "Minimum supported Rust version doesn't match avertised one." |
| 34 | +# exit |
| 35 | +#fi |
| 36 | +# |
| 37 | +##if [[ -n $(git status --porcelain) ]]; then |
| 38 | +## echo "This repository isn't clean. Make sure to add or delete the corresponding files." |
| 39 | +## exit 1 |
| 40 | +##fi |
| 41 | +# |
| 42 | +##if [[ ]]; then |
| 43 | +## echo "You're not on master." |
| 44 | +## exit 1 |
| 45 | +##fi |
| 46 | +# |
| 47 | +#echo ">>> Testing release configuration with default features ..." |
| 48 | +# |
| 49 | +#cargo build --release |
| 50 | +#cargo test --release |
| 51 | +# |
| 52 | +#echo ">>> Testing release configuration with \`applgrid\` feature ..." |
| 53 | +# |
| 54 | +#cargo build --release --features=applgrid |
| 55 | +#cargo test --release --features=applgrid |
| 56 | +# |
| 57 | +#echo ">>> Testing release configuration with \`fastnlo\` feature ..." |
| 58 | +# |
| 59 | +#cargo build --release --features=fastnlo |
| 60 | +#cargo test --release --features=fastnlo |
| 61 | +# |
| 62 | +#echo ">>> Testing release configuration with \`fktable\` feature ..." |
| 63 | +# |
| 64 | +#cargo build --release --features=fktable |
| 65 | +#cargo test --release --features=fktable |
| 66 | +# |
| 67 | +#echo ">>> Testing if 'pineappl' can be published ..." |
| 68 | +# |
| 69 | +#cd pineappl |
| 70 | +#cargo publish --dry-run |
| 71 | +#cd .. |
| 72 | +# |
| 73 | +#echo ">>> Updating version strings ..." |
| 74 | +# |
| 75 | +#sed -i \ |
| 76 | +# -e "s:\(## \[Unreleased\]\):\1\n\n## [${version}] - $(date +%d/%m/%Y):" \ |
| 77 | +# -e "s:\[Unreleased\]\(\: https\://github.com/N3PDF/pineappl/compare/v\)\(.*\)...HEAD:[Unreleased]\1${version}...HEAD\n[${version}]\1\2...v${version}:" \ |
| 78 | +# CHANGELOG.md |
| 79 | +# |
| 80 | +#sed -i \ |
| 81 | +# -e "s:^version = \".*\":version = \"${version}\":" \ |
| 82 | +# -e "s:^\(pineappl = .*\)version = \".*\":\1version = \"${version}\":" \ |
| 83 | +# pineappl{,_capi,_cli,_py}/Cargo.toml |
| 84 | +# |
| 85 | +#echo ">>> Commiting and pushing changes ..." |
86 | 86 |
|
87 | 87 | git commit -a -m "Release v${version}"
|
88 | 88 | git tag -a v${version} -m v${version}
|
|
0 commit comments