This commit is contained in:
bvn13 2024-10-11 22:02:28 +03:00
parent 8b556d5ef8
commit ba92aafe69
8 changed files with 195 additions and 3 deletions

8
.idea/git-pusher.iml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

7
.idea/misc.xml Normal file
View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Poetry (git-pusher)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (git-pusher)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/git-pusher.iml" filepath="$PROJECT_DIR$/.idea/git-pusher.iml" />
</modules>
</component>
</project>

6
.idea/vcs.xml Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

154
.idea/workspace.xml Normal file
View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="f7a86005-20e5-47c8-99fc-f234aacecb2c" name="Changes" comment="service installation scripts">
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
</list>
<list id="c103426e-f41f-4bc0-bf1a-5b4068e3a91b" name="dont commit" comment="">
<change afterPath="$PROJECT_DIR$/.idea/git-pusher.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/profiles_settings.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectColorInfo"><![CDATA[{
"associatedIndex": 5
}]]></component>
<component name="ProjectId" id="2n7qJLzXgtAgVO2rAVhrOP8bBy8" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"Python.main.executor": "Run",
"RunOnceActivity.ShowReadmeOnStart": "true",
"git-widget-placeholder": "develop"
}
}]]></component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/src" />
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/app" />
</key>
</component>
<component name="RunManager">
<configuration name="main" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="git-pusher" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/src/main.py" />
<option name="PARAMETERS" value="-w $PROJECT_DIR$/../test-1" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
<option name="MODULE_MODE" value="false" />
<option name="REDIRECT_INPUT" value="false" />
<option name="INPUT_FILE" value="" />
<method v="2" />
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python.main" />
</list>
</recent_temporary>
</component>
<component name="SharedIndexes">
<attachedChunks>
<set>
<option value="bundled-python-sdk-0e3be3396995-c546a90a8094-com.jetbrains.pycharm.community.sharedIndexes.bundled-PC-242.23339.19" />
</set>
</attachedChunks>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="f7a86005-20e5-47c8-99fc-f234aacecb2c" name="Changes" comment="" />
<changelist id="c103426e-f41f-4bc0-bf1a-5b4068e3a91b" name="dont commit" comment="" />
<created>1728334389035</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1728334389035</updated>
</task>
<task id="LOCAL-00001" summary="initial">
<option name="closed" value="true" />
<created>1728335923308</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1728335923308</updated>
</task>
<task id="LOCAL-00002" summary="working MVP">
<option name="closed" value="true" />
<created>1728506364549</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1728506364549</updated>
</task>
<task id="LOCAL-00003" summary="service installation scripts">
<option name="closed" value="true" />
<created>1728508947299</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1728508947299</updated>
</task>
<task id="LOCAL-00004" summary="service installation scripts">
<option name="closed" value="true" />
<created>1728509015325</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1728509015325</updated>
</task>
<option name="localTasksCounter" value="5" />
<servers />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="initial" />
<MESSAGE value="working MVP" />
<MESSAGE value="service installation scripts" />
<option name="LAST_COMMIT_MESSAGE" value="service installation scripts" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/src/main.py</url>
<line>43</line>
<option name="timeStamp" value="4" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project>

View File

@ -5,7 +5,7 @@ After=network.target
[Service] [Service]
Type=simple Type=simple
WorkingDirectory=<DIR> WorkingDirectory=<DIR>
ExecStart=poetry run git-pusher -w <WATCH_DIR> ExecStart=<POETRY> run git-pusher -w <WATCH_DIR>
CPUSchedulingPolicy=idle CPUSchedulingPolicy=idle
IOSchedulingClass=3 IOSchedulingClass=3
Restart=always Restart=always

View File

@ -41,7 +41,9 @@ fi
printf "WATCH_DIR = %s\n" "$WATCH_DIR" printf "WATCH_DIR = %s\n" "$WATCH_DIR"
FNAME="git-pusher-$ID.service" FNAME="git-pusher-$ID.service"
SERVICEFILE="$HOME/.config/systemd/user/$FNAME" SERVICEPATH="$HOME/.config/systemd/user/"
mkdir -p "$SERVICEPATH"
SERVICEFILE="$SERVICEPATH/$FNAME"
echo "FNAME = $FNAME" echo "FNAME = $FNAME"
echo "SERVICEFILE = $SERVICEFILE" echo "SERVICEFILE = $SERVICEFILE"
@ -61,7 +63,8 @@ poetry install
echo "Creating service file..." echo "Creating service file..."
cat git-pusher.service | sed 's?<DIR>?'`pwd`'?' | sed 's?<WATCH_DIR>?'$WATCH_DIR'?' | tee -a "$SERVICEFILE" > /dev/null touch "$SERVICEFILE"
cat git-pusher.service | sed 's?<DIR>?'`pwd`'?' | sed 's?<WATCH_DIR>?'$WATCH_DIR'?' | sed 's?<POETRY>?'$POETRY'?' | tee -a "$SERVICEFILE" > /dev/null
echo "Reloading daemons..." echo "Reloading daemons..."