Попытка загрузить последнюю версию pando c в скрипт сборки circleci - PullRequest
2 голосов
/ 09 января 2020

Я пытаюсь выполнить преобразование моего README из уценки в reStructuredText, используя pando c, чтобы я мог построить яйцо, которое можно развернуть в pypi. К сожалению, версия pando c, которую использует circleci (1.17.2), имеет проблему с тем, как структурированы некоторые таблицы. Похоже, если я использую последнюю версию pando c (2.9.1.1), все будет работать нормально, но я не могу заставить кругли скачать последнюю версию.

Пока попытался использовать следующее в моем .circleci / config.yml :

steps:
- run: sudo apt-get update && sudo apt-get install -y pandoc

И я получаю следующий вывод:

Ign:1 http://deb.debian.org/debian stretch InRelease
Get:2 http://deb.debian.org/debian stretch-updates InRelease [91.0 kB]
Get:3 http://security.debian.org/debian-security stretch/updates InRelease [94.3 kB]
Get:4 http://deb.debian.org/debian stretch-backports InRelease [91.8 kB]
Hit:5 http://deb.debian.org/debian stretch Release
Fetched 277 kB in 0s (624 kB/s)

Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done

The following additional packages will be installed:
  liblua5.1-0 libluajit-5.1-2 libluajit-5.1-common pandoc-data
Suggested packages:
  texlive-latex-recommended texlive-xetex texlive-luatex pandoc-citeproc
  texlive-latex-extra wkhtmltopdf
The following NEW packages will be installed:
  liblua5.1-0 libluajit-5.1-2 libluajit-5.1-common pandoc pandoc-data
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 9724 kB of archives.
After this operation, 72.6 MB of additional disk space will be used.

Get:1 http://deb.debian.org/debian stretch/main amd64 liblua5.1-0 amd64 5.1.5-8.1+b2 [111 kB]
Get:2 http://deb.debian.org/debian stretch/main amd64 libluajit-5.1-common all 2.0.4+dfsg-1 [36.6 kB]
Get:3 http://deb.debian.org/debian stretch/main amd64 libluajit-5.1-2 amd64 2.0.4+dfsg-1+b1 [207 kB]
Get:4 http://deb.debian.org/debian stretch/main amd64 pandoc-data all 1.17.2~dfsg-3 [265 kB]
Get:5 http://deb.debian.org/debian stretch/main amd64 pandoc amd64 1.17.2~dfsg-3 [9104 kB]

Fetched 9724 kB in 0s (80.5 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package liblua5.1-0:amd64.
(Reading database ... 42585 files and directories currently installed.)
Preparing to unpack .../liblua5.1-0_5.1.5-8.1+b2_amd64.deb ...
Unpacking liblua5.1-0:amd64 (5.1.5-8.1+b2) ...
Selecting previously unselected package libluajit-5.1-common.
Preparing to unpack .../libluajit-5.1-common_2.0.4+dfsg-1_all.deb ...
Unpacking libluajit-5.1-common (2.0.4+dfsg-1) ...
Selecting previously unselected package libluajit-5.1-2:amd64.
Preparing to unpack .../libluajit-5.1-2_2.0.4+dfsg-1+b1_amd64.deb ...
Unpacking libluajit-5.1-2:amd64 (2.0.4+dfsg-1+b1) ...
Selecting previously unselected package pandoc-data.
Preparing to unpack .../pandoc-data_1.17.2~dfsg-3_all.deb ...
Unpacking pandoc-data (1.17.2~dfsg-3) ...
Selecting previously unselected package pandoc.
Preparing to unpack .../pandoc_1.17.2~dfsg-3_amd64.deb ...
Unpacking pandoc (1.17.2~dfsg-3) ...
Setting up libluajit-5.1-common (2.0.4+dfsg-1) ...
Setting up pandoc-data (1.17.2~dfsg-3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Setting up libluajit-5.1-2:amd64 (2.0.4+dfsg-1+b1) ...
Setting up liblua5.1-0:amd64 (5.1.5-8.1+b2) ...
Setting up pandoc (1.17.2~dfsg-3) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...

Вот информация о том, что В моей сборке используется os:

> cat /etc/os-release

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Я хотел бы попробовать и получить последнюю версию 2.9.1.1

1 Ответ

1 голос
/ 09 января 2020

Вы можете использовать этот код, который мы также используем с pandoc / lua -фильтром , чтобы всегда использовать последнюю версию pando c:

RELEASES_URL='https://github.com/jgm/pandoc/releases'

# the 'latest' URL redirects to the name of the latest tag.
export PANDOCVERSION=$(curl -I "$RELEASES_URL/latest" | sed -ne 's#Location:.*tag/\(.*\)$#\1#p' | tr -d "\n\r")

# Show pandoc version in logs
echo $PANDOCVERSION

# downloads and extract
wget $RELEASES_URL/download/$PANDOCVERSION/pandoc-$PANDOCVERSION-linux-amd64.tar.gz
tar xvzf pandoc-$PANDOCVERSION-linux-amd64.tar.gz

# add executable to PATH
export PATH=$HOME/pandoc-$PANDOCVERSION/bin:$PATH
...