Skip to content

Commit

Permalink
Update .gitignore and add release script
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Dec 18, 2024
1 parent 6ff02bd commit 62d057f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
*.cmd
# MacOS specific ignores
.DS_Store

# development
.sublime/
.venv/
.vscode/

# python cache files
__pycache__/
*.pyc

39 changes: 39 additions & 0 deletions make.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
@echo off
setlocal
chcp 65001 >nul
pushd %~dp0

if /i "%1" == "release" goto RELEASE
goto :usage

:RELEASE
if "%2"== "" goto :usage
set version=%2

for %%d in ("%~dp0.") do set package=%%~nxd

echo Creating assets for "%package%"...

:: create downloadable asset for ST4126+
set branch=master
set tag=4152-%version%
set archive=%package%.sublime-package
set assets="%archive%#%archive%"
call git push origin %branch%
call git archive --format zip -o "%archive%" %branch%

:: create the release
gh release create --target %branch% -t "Release %version%" "%tag%" %assets%
del /f /q *.sublime-package
git fetch
goto :eof

:USAGE
echo USAGE:
echo.
echo all ^[release^]
echo prefs ^[release^]
echo make ^[release^]
echo.
echo release ^<semver^> -- create and publish a release (e.g. 1.2.3)
goto :eof

0 comments on commit 62d057f

Please sign in to comment.