Skip to content

Commit

Permalink
Updated License and ReadMe file, added new script and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
stolyarenkoks committed Jan 9, 2025
1 parent 7b4c53e commit 1613a58
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 3 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/license-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: license-update

on:
schedule:
- cron: '0 20 * * 5' # Every Friday at 8 PM
workflow_dispatch:

jobs:
update-license:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Git user
run: |
git config --global user.email "${{ secrets.EMAIL }}"
git config --global user.name "${{ secrets.USER_NAME }}"
- name: Update LICENSE and README.md
run: |
chmod +x ./scripts/license-update.sh
./scripts/license-update.sh
- name: Commit and push changes
run: |
git add LICENSE README.md
git commit -m "Updated License and ReadMe files"
git push origin $(git rev-parse --abbrev-ref HEAD)
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
The MIT License (MIT)

Copyright © January 08, 2025 Konstantin Stolyarenko

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Additional Condition:
If you use this software in your project, you must provide clear attribution
to the original author (Konstantin Stolyarenko) and include a link to the
original repository: https://github.com/stolyarenkoks/Pencil-Drawing-UIKit-Demo

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ Developed entirely natively using Swift and UIKit based on Clean Swift Architect

![Preview](preview.png)

[Demo Video](demo.mov)

## Installation
The project does not require additional installation, as no dependency manager is currently used.

Expand Down Expand Up @@ -61,4 +59,4 @@ In addition to the Scenes in the project, there are also general categories that
You can read more about Clean Swift [here](https://clean-swift.com/).

## License
Copyright © 2023 SKS. All rights reserved.
Copyright © January 07, 2025 Konstantin Stolyarenko. All rights reserved.
10 changes: 10 additions & 0 deletions scripts/license-update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# Get full date: "January 1, 2025"
FULL_DATE=$(date +"%B %d, %Y")

# Update LICENSE file, replacing only the date
sed -i "s/Copyright © [A-Za-z]* [0-9]*, [0-9]*\(.*\)$/Copyright © $FULL_DATE\1/" LICENSE

# Update README.md file, replacing only the date
sed -i "s/Copyright © [A-Za-z]* [0-9]*, [0-9]*\(.*\)$/Copyright © $FULL_DATE\1/" README.md

0 comments on commit 1613a58

Please sign in to comment.