Skip to content

Commit 98cad18

Browse files
committed
Initial commit of bash scripts
1 parent d41eda0 commit 98cad18

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

build.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
# Prevents script from running if there are any errors
4+
set -e
5+
6+
# Update
7+
git pull origin master
8+
9+
# Generate the files
10+
bash generate.sh
11+
12+
# Make output directory, don't fail if it exists
13+
# mkdir -p build
14+
15+
# Copy to output directory
16+
# cp -R {2.6,3.2,3.3,index.html,results.json,wheel.css} build

deploy.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
# Adapted from https://zellwk.com/blog/deploy-static-site/
4+
5+
6+
# Prevents script from running if there are any errors
7+
set -e
8+
9+
# Gets commit hash as message
10+
REV=`git rev-parse HEAD`
11+
12+
# git checkout gh-pages # Step 3
13+
14+
# git rm -rf . # Step 4
15+
16+
# git checkout gh-pages -- .gitignore # Step 5
17+
18+
# cp -R build/* . && rm -rf build # Step 6
19+
20+
git add . # Step 7
21+
22+
git commit -m "Deploy $REV" # Step 8
23+
24+
git push origin master # Step 9
25+
26+
# git checkout master # Step 10

generate.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# Prevents script from running if there are any errors
4+
set -e
5+
6+
# Generate the files
7+
# pypinfo --test --json --limit 500 --days 365 "" project > top-pypi-packages.json
8+
# TESTING
9+
echo "$(date)"
10+
echo "$(date)" > top-pypi-packages.json

0 commit comments

Comments
 (0)