Skip to content

Commit 732bd43

Browse files
committed
Initial commit
0 parents  commit 732bd43

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

.github/workflows/README_success.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# That worked!
2+
3+
You successfully created this repository from the template.
4+
5+
To get started now, we prepared two branches for you, containing the starter code for Java and Haskell.
6+
You can open a Pull Request for this repository by simply clicking on the link of your choice:
7+
8+
[Java](REPO_REF/compare/main...starter/java)
9+
10+
[Haskell](REPO_REF/compare/main...starter/haskell)
11+
12+
Have fun!

.github/workflows/starter-code.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Choose the starter code of your choice
2+
on:
3+
push:
4+
branches: [main]
5+
6+
jobs:
7+
prepare-repo:
8+
name: Prepare repository
9+
runs-on: ubuntu-latest
10+
if: github.repository != 'LS-Lab/Compilers-course-code-template'
11+
permissions:
12+
contents: write # we need to push!
13+
14+
steps:
15+
- name: Checkout fresh repository
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Git user
19+
run: |
20+
git config user.email "[email protected]"
21+
git config user.name "GitHub Action"
22+
23+
- name: Edit README and remove this workflow
24+
run: |
25+
git switch main
26+
mv .github/workflows/README_success.md README.md
27+
sed -i "s|REPO_REF|${{ github.server_url }}/${{ github.repository }}|g" README.md
28+
rm -r .github/workflows/starter-code.yaml
29+
git add .
30+
git commit -m "Prepare Repository for usage"
31+
32+
- name: Push changes
33+
uses: ad-m/[email protected]
34+
with:
35+
branch: main
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Add original remote
39+
run: |
40+
git remote add original https://github.com/LS-Lab/Compilers-course-code-template
41+
git fetch original
42+
43+
- name: Create Haskell branch
44+
run: |
45+
git switch -c starter/haskell original/haskell
46+
git rebase -Xtheirs main
47+
git push --set-upstream origin starter/haskell
48+
49+
- name: Create Java branch
50+
run: |
51+
git switch -c starter/java original/java
52+
git rebase -Xtheirs main
53+
git push --set-upstream origin starter/java

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Compiler Design Starter Code
2+
3+
This repository contains starter code for the Compiler Design course 2025.
4+
The code can be found in the `java` and `haskell` branches.
5+
6+
There are several options how you can access the code:
7+
8+
## Forking (recommended)
9+
10+
This is a template repository.
11+
That means you will find a fancy "Use this template" button on the top right.
12+
By creating a new repository from that, you are almost ready to go.
13+
You will receive further instructions once you got that part right and the GitHub Action
14+
had time to run.
15+
16+
## Downloading a ZIP File
17+
18+
You can also directly download a ZIP file containing the starter code.
19+
As you might notice, the starter code isn't on this branch.
20+
That means you have to select either the `java` or the `haskell` branch.
21+
Then, you can use the integrated `Download ZIP` button.
22+
23+
## Cloning and Pushing
24+
25+
You can obviously also just clone this repository and push its content to wherever you want.
26+
If you plan to do that, you likely know what you're doing.
27+

0 commit comments

Comments
 (0)