Skip to content

Commit e0c7218

Browse files
committed
Allow to build without github token
1 parent 4d81ce9 commit e0c7218

File tree

3 files changed

+24
-22
lines changed

3 files changed

+24
-22
lines changed

continuous_integration/qhttpserver.sh

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
#!/bin/bash
22

3+
GITHUB_TOKEN="$1"
4+
35
set -o errexit
46
set -o pipefail
57
set -o nounset
68

7-
GITHUB_TOKEN=$1
89

910
echo "Github API rate status: $(curl -i https://api.github.com/repos/aymara/qhttpserver/releases/latest?access_token=$GITHUB_TOKEN) "
1011

11-
QHTTPSERVER_LATEST_RELEASE_JSON=$(curl -s https://api.github.com/repos/aymara/qhttpserver/releases/latest?access_token=$GITHUB_TOKEN)
12-
echo "QHTTPSERVER_LATEST_RELEASE_JSON=$QHTTPSERVER_LATEST_RELEASE_JSON"
12+
QHTTPSERVER_LATEST_RELEASE_JSON=$(curl -s https://api.github.com/repos/aymara/qhttpserver/releases/latest?access_token=$GITHUB_TOKEN)
13+
echo "QHTTPSERVER_LATEST_RELEASE_JSON=$QHTTPSERVER_LATEST_RELEASE_JSON"
1314

14-
URL=$(echo "$QHTTPSERVER_LATEST_RELEASE_JSON"| grep browser_download_url | grep debian9 | grep '.deb"' | head -n 1 | cut -d '"' -f 4)
15-
echo "URL=$URL"
16-
TEMP_DEB="$(mktemp)"
17-
curl -vLJ -H 'Accept: application/octet-stream' $URL?access_token=$GITHUB_TOKEN -o "$TEMP_DEB"
15+
URL=$(echo "$QHTTPSERVER_LATEST_RELEASE_JSON"| grep browser_download_url | grep debian9 | grep '.deb"' | head -n 1 | cut -d '"' -f 4)
16+
echo "URL=$URL"
17+
TEMP_DEB="$(mktemp)"
18+
curl -vLJ -H 'Accept: application/octet-stream' $URL?access_token=$GITHUB_TOKEN -o "$TEMP_DEB"
1819
dpkg -i "$TEMP_DEB"
1920

continuous_integration/svmtool-cpp.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/bin/bash
22

3+
GITHUB_TOKEN="$1"
4+
35
set -o errexit
46
set -o pipefail
57
set -o nounset
68

7-
GITHUB_TOKEN=$1
8-
99
echo "Github API rate status: $(curl -i https://api.github.com/repos/aymara/svmtool-cpp/releases/latest?access_token=$GITHUB_TOKEN) "
1010

11-
SVMTOOL_LATEST_RELEASE_JSON=$(curl -s https://api.github.com/repos/aymara/svmtool-cpp/releases/latest?access_token=$GITHUB_TOKEN)
12-
echo "SVMTOOL_LATEST_RELEASE_JSON=$SVMTOOL_LATEST_RELEASE_JSON"
11+
SVMTOOL_LATEST_RELEASE_JSON=$(curl -s https://api.github.com/repos/aymara/svmtool-cpp/releases/latest?access_token=$GITHUB_TOKEN)
12+
echo "SVMTOOL_LATEST_RELEASE_JSON=$SVMTOOL_LATEST_RELEASE_JSON"
1313

14-
URL=$(echo "$SVMTOOL_LATEST_RELEASE_JSON" | grep browser_download_url | grep debian9 | grep '.deb"' | head -n 1 | cut -d '"' -f 4)
15-
echo "URL=$URL"
14+
URL=$(echo "$SVMTOOL_LATEST_RELEASE_JSON" | grep browser_download_url | grep debian9 | grep '.deb"' | head -n 1 | cut -d '"' -f 4)
15+
echo "URL=$URL"
1616

17-
TEMP_DEB="$(mktemp)"
18-
curl -vLJ -H 'Accept: application/octet-stream' $URL?access_token=$GITHUB_TOKEN -o "$TEMP_DEB"
17+
TEMP_DEB="$(mktemp)"
18+
curl -vLJ -H 'Accept: application/octet-stream' $URL?access_token=$GITHUB_TOKEN -o "$TEMP_DEB"
1919
dpkg -i "$TEMP_DEB"

continuous_integration/svmtool.sh

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
#!/bin/bash
22

3+
GITHUB_TOKEN="$1"
4+
35
set -o errexit
46
set -o pipefail
57
set -o nounset
68

7-
GITHUB_TOKEN=$1
89

910
echo "Github API rate status: $(curl -i https://api.github.com/repos/aymara/SVMTool/releases/latest?access_token=$GITHUB_TOKEN) "
1011

11-
SVMTOOL_LATEST_RELEASE_JSON=$(curl -s https://api.github.com/repos/aymara/SVMTool/releases/latest?access_token=$GITHUB_TOKEN)
12-
echo "SVMTOOL_LATEST_RELEASE_JSON=$SVMTOOL_LATEST_RELEASE_JSON"
12+
SVMTOOL_LATEST_RELEASE_JSON=$(curl -s https://api.github.com/repos/aymara/SVMTool/releases/latest?access_token=$GITHUB_TOKEN)
13+
echo "SVMTOOL_LATEST_RELEASE_JSON=$SVMTOOL_LATEST_RELEASE_JSON"
1314

14-
URL=$(echo "$SVMTOOL_LATEST_RELEASE_JSON" | grep browser_download_url |grep '.tgz"' | head -n 1 | cut -d '"' -f 4)
15-
echo "URL=$URL"
15+
URL=$(echo "$SVMTOOL_LATEST_RELEASE_JSON" | grep browser_download_url |grep '.tgz"' | head -n 1 | cut -d '"' -f 4)
16+
echo "URL=$URL"
1617

1718
curl -vLJ -H 'Accept: application/octet-stream' $URL?access_token=$GITHUB_TOKEN | tar xvz
1819

1920
pushd SVMTool-1.3.1
20-
perl Makefile.PL
21-
make
21+
perl Makefile.PL
22+
make
2223
make install
2324
popd

0 commit comments

Comments
 (0)