Skip to content

Commit

Permalink
Revert "upgrade pretext version, fix issue#112 (<output> bloc), FSM: …
Browse files Browse the repository at this point in the history
…replace …" (#186)

This reverts commit eab0664.
  • Loading branch information
boughrira authored Jan 9, 2025
1 parent eab0664 commit 8d4fed1
Show file tree
Hide file tree
Showing 20 changed files with 526 additions and 1,008 deletions.
9 changes: 0 additions & 9 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
//////////////////////////////////////////////////////////////
//
// This file provides configuration options so that a PreTeXt
// project can be edited and built using GitHub's Codespaces.
// It is recommended to keep this in your repository even if you
// do not use this feature, as it will allow other to explore
// your project easily.
//
///////////////////////////////////////////////////////////////
{
"name": "PreTeXt-Codespaces",

Expand Down
44 changes: 5 additions & 39 deletions .github/workflows/pretext-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,27 @@ on:
# Runs on pull requests
pull_request:
branches: ["*"]

# Runs on pushes to main
push:
branches: ["main"]

# Runs on demand
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container: oscarlevin/pretext:full

steps:
- name: Checkout source
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
apt-get update
apt-get install -y inkscape
shell: bash

- name: Verify Inkscape Installation
run: inkscape --version

- name: install deps
run: |
pip install -r requirements.txt
pretext --version
- name: ensure proper asset type in image references
run: ./update-img-refs.py source/ --to-svg
run: pip install -r requirements.txt

- name: build deploy targets
run: |
version="$(pretext --version)"
major="$(echo $version | cut -d '.' -f 1)"
minor="$(echo $version | cut -d '.' -f 2)"
if [ "$major" -ge 2 -a "$minor" -ge 5 ]; then
echo "PreTeXt version is 2.5 or greater; using new build command"
pretext build --deploys
else
echo "PreTeXt version is less than 2.5, using old build command"
pretext build
fi
run: pretext build --deploys

- name: stage deployment
run: pretext deploy --stage-only

Expand All @@ -62,11 +33,6 @@ jobs:
name: deploy
path: output/stage

- name: ensure proper asset type in image references for pdf output
run: |
make svg-to-pdf
./update-img-refs.py source/ --to-pdf
- name: Build PDF with PreTeXt
run: pretext build print

Expand Down Expand Up @@ -140,7 +106,7 @@ jobs:
- name: Commit changes
run: |
git add output/print/discrete-math-with-sage.pdf
git add output/print/main.pdf
git commit -m "Update PDF" || echo "No changes to commit"
- name: Force push to pdf-update branch
Expand Down
16 changes: 1 addition & 15 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# ensure this file is tracked
!.gitignore

# don't track unpublished builds or stage (note: Runestone uses `published`)
# don't track unpublished builds or stage
output/web
output/stage
published

# don't track assets generated from source
generated-assets
Expand Down Expand Up @@ -99,16 +98,3 @@ codechat_config.yaml

# Don't track local files under /venv (virtual local environment)
venv

# Don't track local temp files and generated files
*.local
*.bak
*.swp
*.old
*.log
*.tmp
assets/*/*.pdf

# Don't track deprecated workflows
.github/workflows/deploy.yml
.github/workflows/test-build.yml
44 changes: 0 additions & 44 deletions Makefile

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 0 additions & 18 deletions assets/finite-state-machines/first_traffic_light_FSM.svg

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8d4fed1

Please sign in to comment.