Skip to content

Commit a4c4a1b

Browse files
Merge pull request #600 from LSSTScienceCollaborations/issue/593/release
Include most recent commit ID, release version, on front page
2 parents 6c4e3dd + 5794ade commit a4c4a1b

File tree

8 files changed

+125
-23
lines changed

8 files changed

+125
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ LSST_Observing_Strategy_White_Paper.pdf
2121
# *.ps
2222
# *.eps
2323
# *.pdf
24+
thisversion.tex
2425

2526
## Bibliography auxiliary files (bibtex/biblatex/biber):
2627
*.bbl

.travis.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
language: ruby
22
rvm:
3-
- 1.9.3
3+
- 1.9.3
44
script: /bin/bash whitepaper/travis.sh
55
# Install LaTeX. This usually takes ~1 hour...
66
before_install:
7-
- yes "" | sudo apt-add-repository ppa:texlive-backports/ppa
8-
- sudo apt-get update -y
9-
- sudo apt-get install -y
10-
inkscape
11-
texlive-fonts-recommended
12-
texlive-latex-extra
13-
texlive-latex-recommended
14-
texlive-xetex
7+
- sudo apt-get install -qq bc tcsh
8+
- yes "" | sudo apt-add-repository ppa:texlive-backports/ppa
9+
- sudo apt-get update -y
10+
- sudo apt-get install -y
11+
inkscape
12+
texlive-fonts-recommended
13+
texlive-latex-extra
14+
texlive-latex-recommended
15+
texlive-xetex
1516
# Finally, if it's the master branch being updated, force-push the
1617
# resulting PDF to an otherwise empty "pdf" branch:
1718
after_success: |

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ Welcome to the online community thinking about LSST survey strategy ("cadence"),
44

55
We are writing a white paper on this topic, primarily composed of a set of individual science cases that are either very important, and somehow stress the observing strategy, and describing how we expect them to be sensitive to LSST observing strategy. MAF metric calculations are then being designed and implemented: these form the quantitative backbone of the document. You may have heard of the coming "Cadence Wars" - this white paper represents the "Cadence Diplomacy" that will allow us, as a community, to avoid, or at least manage, that conflict. We welcome contributions from all around the LSST Science community.
66

7-
* **[Read the current draft of the white paper](http://www.slac.stanford.edu/~digel/ObservingStrategy/whitepaper/LSST_Observing_Strategy_White_Paper.pdf)** (automatically generated PDF, updated every hour, in principle - [log file is here](http://www.slac.stanford.edu/~digel/ObservingStrategy/whitepaper/LSST_Observing_Strategy_White_Paper.log))
7+
<!--
8+
* **[Read the current draft of the white paper](http://www.slac.stanford.edu/~digel/ObservingStrategy/whitepaper/LSST_Observing_Strategy_White_Paper.pdf)** (automatically generated PDF, updated every hour, in principle - [log file is here](http://www.slac.stanford.edu/~digel/ObservingStrategy/whitepaper/LSST_Observing_Strategy_White_Paper.log)) -->
9+
10+
* **[Read the current draft of the white paper](https://github.com/LSSTScienceCollaborations/ObservingStrategy/blob/pdf/whitepaper/LSST_Observing_Strategy_White_Paper.pdf
11+
)** (automatically generated PDF, rebuilt every time the `master` branch is updated)
812
[![Build Status](https://travis-ci.org/LSSTScienceCollaborations/ObservingStrategy.svg?branch=master)](https://travis-ci.org/LSSTScienceCollaborations/ObservingStrategy)
913

1014
* **[Join the conversation about this project at its issues list](https://github.com/LSSTScienceCollaborations/ObservingStrategy/issues)**

whitepaper/LSST_Observing_Strategy_White_Paper.tex

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,24 +31,15 @@
3131

3232
\vspace*{\stretch{2}}
3333

34-
% Version number, to be taken out for published draft
35-
\include{VersionDate}
36-
37-
% \begin{center}
38-
% {\Large\bf Version 1.0\\
39-
%
40-
% \vspace*{\stretch{0.2}}
41-
%
42-
% November 2009}
43-
% \end{center}
44-
4534
\vspace*{\stretch{2.5}}
4635

4736
{\Large Prepared by the LSST Science Collaborations,}\\
4837
\vspace*{\stretch{0.15}}
4938
{\Large with support from the LSST Project. }\\
5039
\vspace*{\stretch{1}}
5140

41+
\input{thisversion.tex}
42+
5243
\end{center}
5344
\end{titlepage}
5445

whitepaper/Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ vclean: clean
1212

1313
pdf: $(PAPER)
1414

15-
LSST_Observing_Strategy_White_Paper.pdf: LSST_Observing_Strategy_White_Paper.tex LSST_Observing_Strategy_White_Paper.sty $(BIBFILES) $(TEXFILES)
15+
LSST_Observing_Strategy_White_Paper.pdf: version LSST_Observing_Strategy_White_Paper.tex LSST_Observing_Strategy_White_Paper.sty $(BIBFILES) $(TEXFILES)
1616
pdflatex LSST_Observing_Strategy_White_Paper.tex
1717
pdflatex LSST_Observing_Strategy_White_Paper.tex
1818
bibtex LSST_Observing_Strategy_White_Paper
1919
pdflatex LSST_Observing_Strategy_White_Paper.tex
2020
pdflatex LSST_Observing_Strategy_White_Paper.tex
2121

22+
version:
23+
tcsh gen_version.csh --version 0.99
24+
2225
run: $(ARG)_standalone.tex LSST_Observing_Strategy_White_Paper.sty $(BIBFILES) $(TEXFILES)
2326
pdflatex $(ARG)_standalone.tex
2427
pdflatex $(ARG)_standalone.tex

whitepaper/gen_version.csh

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#!/bin/tcsh
2+
#=======================================================================
3+
#+
4+
# NAME:
5+
# gen_version
6+
#
7+
# PURPOSE:
8+
# Find out the most recent commit ID, and write a small tex file
9+
# for input into the white paper.
10+
#
11+
# COMMENTS:
12+
#
13+
# INPUTS:
14+
# None
15+
#
16+
# OPTIONAL INPUTS:
17+
# -h --help Print this header
18+
# -v --version Manual version number
19+
#
20+
# OUTPUTS:
21+
# version.tex Tex file for input into white paper
22+
#
23+
# EXAMPLES:
24+
#
25+
# BUGS:
26+
#
27+
#-
28+
# ======================================================================
29+
30+
set help = 0
31+
set version = 0.0
32+
33+
while ( $#argv > 0 )
34+
switch ($argv[1])
35+
case -h:
36+
shift argv
37+
set help = 1
38+
breaksw
39+
case --{help}:
40+
shift argv
41+
set help = 1
42+
breaksw
43+
case -v:
44+
shift argv
45+
set version = $argv[1]
46+
shift argv
47+
breaksw
48+
case --{version}:
49+
shift argv
50+
set version = $argv[1]
51+
shift argv
52+
breaksw
53+
endsw
54+
end
55+
56+
if ($help) then
57+
more $0
58+
goto FINISH
59+
endif
60+
61+
# # Get most recent tag name:
62+
# set version = `git describe --tags | cut -d'-' -f1`
63+
# set version_url = "https://github.com/LSSTScienceCollaborations/ObservingStrategy/releases/tag/${version}"
64+
# Abandoning this - the problem is that when we make a new release,
65+
# it won't update the tags until *after we've made it, at which
66+
# point the PDF has already become part of the release. I think we have
67+
# to set the Version number by hand.
68+
69+
# Get most recent commit ID and its date:
70+
set SHA = `git show | head -1 | cut -d' ' -f2`
71+
set short_SHA = `echo $SHA | cut -c1-7`
72+
set date = `git log --date=rfc | head -3 | grep Date | cut -d':' -f2-`
73+
74+
# Get URL of latest commit:
75+
set commit_url = "https://github.com/LSSTScienceCollaborations/ObservingStrategy/commit/${SHA}?diff=split"
76+
77+
# Append commit ID to version number:
78+
set version = "${version}.${short_SHA}"
79+
80+
# Write tex file for input into paper:
81+
set texfile = "thisversion.tex"
82+
set template = "version.tex"
83+
\rm -f $texfile ; touch $texfile
84+
85+
cat $template | \
86+
sed s%XX%"${version}"%g | \
87+
sed s%URL%"${commit_url}"%g | \
88+
sed s%SHA%"${short_SHA}"%g | \
89+
sed s%DATE%"${date}"%g > $texfile
90+
91+
cat $texfile
92+
93+
# ======================================================================
94+
FINISH:
95+
# ======================================================================

whitepaper/introduction.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ \subsection{Timeline}
458458
project resources, these milestones should be considered as those we
459459
could achieve given our best effort. Likewise, given the limited
460460
availability of resources in the SOCS and Scheduler engineering team,
461-
support of community members who wish to use \OpSim v4 will be on a best
461+
support of community members who wish to use \OpSim~v4 will be on a best
462462
effort basis. \OpSim v4 will be delivered as a Docker container and its
463463
use and operation will be documented, but there will be no guarantee of
464464
support for, or timeliness in response to requests for support from,

whitepaper/version.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
\begin{center}{
2+
{\large\bf Version XX}\\
3+
\vspace*{\stretch{0.1}}
4+
Most recent commit: \href{URL}{\texttt{SHA}}\\
5+
\vspace*{\stretch{0.1}}
6+
(DATE)}\\
7+
\end{center}

0 commit comments

Comments
 (0)